diff options
585 files changed, 14933 insertions, 8943 deletions
diff --git a/.github/workflows/static_checks.yml b/.github/workflows/static_checks.yml index c2af0ac549..3fa759bb03 100644 --- a/.github/workflows/static_checks.yml +++ b/.github/workflows/static_checks.yml @@ -19,7 +19,7 @@ jobs: - name: Install dependencies run: | sudo apt-get install -qq dos2unix recode clang-format - sudo pip3 install git+https://github.com/psf/black@master pygments + sudo pip3 install black==20.8b1 pygments - name: File formatting checks (file_format.sh) run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f8f8bd676..88c9e1a8a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -384,6 +384,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Ogg samples now have an icon in the editor, like WAV samples. - Camera2D drag margins are now disabled by default. - If porting a project from Godot 3.1 where drag margins were used, these must be enabled manually again. +- The Camera2D Offset property now ignores the Limit property. + - To get the old behavior back, move the camera itself instead of changing the offset. - `Camera.project_position()` now requires a second `depth` argument to determine the distance of the point from the camera. - To get the old behavior back, pass the Camera's `near` property value as the second argument. - `Skeleton.set_bone_global_pose()` was replaced by `Skeleton.set_bone_global_pose_override()`. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c28692c34f..1abd76b2ff 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -135,6 +135,29 @@ If your pull request modifies parts of the code in a non-obvious way, make sure to add comments in the code as well. This helps other people understand the change without having to look at `git blame`. +### Write unit tests + +When fixing a bug or contributing a new feature, we recommend including unit +tests in the same commit as the rest of the pull request. Unit tests are pieces +of code that compare the output to a predetermined *expected result* to detect +regressions. Tests are compiled and run on GitHub Actions for every commit and +pull request. + +Pull requests that include tests are more likely to be merged, since we can have +greater confidence in them not being the target of regressions in the future. + +For bugs, the unit tests should cover the functionality that was previously +broken. If done well, this ensures regressions won't appear in the future +again. For new features, the unit tests should cover the newly added +functionality, testing both the "success" and "expected failure" cases if +applicable. + +Feel free to contribute standalone pull requests to add new tests or improve +existing tests as well. + +See [Unit testing](https://docs.godotengine.org/en/latest/development/cpp/unit_testing.html) +for information on writing tests in Godot's C++ codebase. + ### Be nice to the Git history Try to make simple PRs that handle one specific topic. Just like for reporting diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt index 757913f0bd..6122452b88 100644 --- a/COPYRIGHT.txt +++ b/COPYRIGHT.txt @@ -380,7 +380,7 @@ License: Zlib Files: ./thirdparty/zstd/ Comment: Zstandard -Copyright: 2016-2019, Facebook, Inc. +Copyright: 2016-2020, Facebook, Inc. License: BSD-3-clause @@ -14,7 +14,6 @@ generous deed immortalized in the next stable release of Godot Engine. Gamblify <https://www.gamblify.com> Heroic Labs <https://heroiclabs.com> - Interblock <http://interblockgaming.com> ## Gold sponsors diff --git a/SConstruct b/SConstruct index b7b0321039..e38e0dc231 100644 --- a/SConstruct +++ b/SConstruct @@ -320,31 +320,6 @@ if selected_platform in platform_list: if env["tools"]: env["tests"] = True - if env["vsproj"]: - env.vs_incs = [] - env.vs_srcs = [] - - def AddToVSProject(sources): - for x in sources: - if type(x) == type(""): - fname = env.File(x).path - else: - fname = env.File(x)[0].path - pieces = fname.split(".") - if len(pieces) > 0: - basename = pieces[0] - basename = basename.replace("\\\\", "/") - if os.path.isfile(basename + ".h"): - env.vs_incs = env.vs_incs + [basename + ".h"] - elif os.path.isfile(basename + ".hpp"): - env.vs_incs = env.vs_incs + [basename + ".hpp"] - if os.path.isfile(basename + ".c"): - env.vs_srcs = env.vs_srcs + [basename + ".c"] - elif os.path.isfile(basename + ".cpp"): - env.vs_srcs = env.vs_srcs + [basename + ".cpp"] - - env.AddToVSProject = AddToVSProject - env.extra_suffix = "" if env["extra_suffix"] != "": @@ -646,6 +621,10 @@ if selected_platform in platform_list: CacheDir(scons_cache_path) print("Scons cache enabled... (path: '" + scons_cache_path + "')") + if env["vsproj"]: + env.vs_incs = [] + env.vs_srcs = [] + Export("env") # Build subdirs, the build order is dependent on link order. diff --git a/core/SCsub b/core/SCsub index 16ee49d003..59fe63b4b3 100644 --- a/core/SCsub +++ b/core/SCsub @@ -121,6 +121,7 @@ if env["builtin_zstd"]: "compress/zstdmt_compress.c", "compress/zstd_compress_literals.c", "compress/zstd_compress_sequences.c", + "compress/zstd_compress_superblock.c", "decompress/huf_decompress.c", "decompress/zstd_ddict.c", "decompress/zstd_decompress_block.c", diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 489ff762c9..c68222c767 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -519,10 +519,6 @@ uint64_t _OS::get_ticks_usec() const { return OS::get_singleton()->get_ticks_usec(); } -uint32_t _OS::get_splash_tick_msec() const { - return OS::get_singleton()->get_splash_tick_msec(); -} - bool _OS::can_use_threads() const { return OS::get_singleton()->can_use_threads(); } @@ -730,7 +726,6 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("delay_msec", "msec"), &_OS::delay_msec); ClassDB::bind_method(D_METHOD("get_ticks_msec"), &_OS::get_ticks_msec); ClassDB::bind_method(D_METHOD("get_ticks_usec"), &_OS::get_ticks_usec); - ClassDB::bind_method(D_METHOD("get_splash_tick_msec"), &_OS::get_splash_tick_msec); ClassDB::bind_method(D_METHOD("get_locale"), &_OS::get_locale); ClassDB::bind_method(D_METHOD("get_model_name"), &_OS::get_model_name); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index a59fcda60c..5c9520d7fe 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -208,7 +208,6 @@ public: void delay_msec(uint32_t p_msec) const; uint32_t get_ticks_msec() const; uint64_t get_ticks_usec() const; - uint32_t get_splash_tick_msec() const; bool can_use_threads() const; diff --git a/core/color.h b/core/color.h index 096e97e9ae..2dbbc52905 100644 --- a/core/color.h +++ b/core/color.h @@ -234,4 +234,8 @@ bool Color::operator<(const Color &p_color) const { } } +_FORCE_INLINE_ Color operator*(const real_t &p_real, const Color &p_color) { + return p_color * p_real; +} + #endif // COLOR_H diff --git a/core/func_ref.cpp b/core/func_ref.cpp index 4427d94d2a..7e062f16d0 100644 --- a/core/func_ref.cpp +++ b/core/func_ref.cpp @@ -64,6 +64,10 @@ void FuncRef::set_function(const StringName &p_func) { function = p_func; } +StringName FuncRef::get_function() { + return function; +} + bool FuncRef::is_valid() const { if (id.is_null()) { return false; @@ -88,6 +92,10 @@ void FuncRef::_bind_methods() { ClassDB::bind_method(D_METHOD("call_funcv", "arg_array"), &FuncRef::call_funcv); ClassDB::bind_method(D_METHOD("set_instance", "instance"), &FuncRef::set_instance); - ClassDB::bind_method(D_METHOD("set_function", "name"), &FuncRef::set_function); ClassDB::bind_method(D_METHOD("is_valid"), &FuncRef::is_valid); + + ClassDB::bind_method(D_METHOD("set_function", "name"), &FuncRef::set_function); + ClassDB::bind_method(D_METHOD("get_function"), &FuncRef::get_function); + + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "function"), "set_function", "get_function"); } diff --git a/core/func_ref.h b/core/func_ref.h index 6b0b22bab5..75b84e705e 100644 --- a/core/func_ref.h +++ b/core/func_ref.h @@ -46,6 +46,7 @@ public: Variant call_funcv(const Array &p_args); void set_instance(Object *p_obj); void set_function(const StringName &p_func); + StringName get_function(); bool is_valid() const; FuncRef() {} diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp index ac032b7d10..6319ffc8f1 100644 --- a/core/input/input_map.cpp +++ b/core/input/input_map.cpp @@ -95,6 +95,8 @@ List<StringName> InputMap::get_actions() const { } List<Ref<InputEvent>>::Element *InputMap::_find_event(Action &p_action, const Ref<InputEvent> &p_event, bool *p_pressed, float *p_strength) const { + ERR_FAIL_COND_V(!p_event.is_valid(), nullptr); + for (List<Ref<InputEvent>>::Element *E = p_action.inputs.front(); E; E = E->next()) { const Ref<InputEvent> e = E->get(); @@ -126,7 +128,7 @@ void InputMap::action_add_event(const StringName &p_action, const Ref<InputEvent ERR_FAIL_COND_MSG(p_event.is_null(), "It's not a reference to a valid InputEvent object."); ERR_FAIL_COND_MSG(!input_map.has(p_action), "Request for nonexistent InputMap action '" + String(p_action) + "'."); if (_find_event(input_map[p_action], p_event)) { - return; //already gots + return; // Already addded. } input_map[p_action].inputs.push_back(p_event); diff --git a/core/io/file_access_zip.h b/core/io/file_access_zip.h index 2cce24e878..c251b3c424 100644 --- a/core/io/file_access_zip.h +++ b/core/io/file_access_zip.h @@ -79,7 +79,7 @@ public: }; class FileAccessZip : public FileAccess { - unzFile zfile; + unzFile zfile = nullptr; unz_file_info64 file_info; mutable bool at_eof; diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 5097f6d98b..21de7835ce 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -863,7 +863,8 @@ void ResourceLoaderBinary::open(FileAccess *p_f) { if (ver_format > FORMAT_VERSION || ver_major > VERSION_MAJOR) { f->close(); - ERR_FAIL_MSG("File format '" + itos(FORMAT_VERSION) + "." + itos(ver_major) + "." + itos(ver_minor) + "' is too new! Please upgrade to a new engine version: " + local_path + "."); + ERR_FAIL_MSG(vformat("File '%s' can't be loaded, as it uses a format version (%d) or engine version (%d.%d) which are not supported by your engine version (%s).", + local_path, ver_format, ver_major, ver_minor, VERSION_BRANCH)); } type = get_unicode_string(); @@ -1136,7 +1137,9 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons if (ver_format > FORMAT_VERSION || ver_major > VERSION_MAJOR) { memdelete(f); memdelete(fw); - ERR_FAIL_V_MSG(ERR_FILE_UNRECOGNIZED, "File format '" + itos(FORMAT_VERSION) + "." + itos(ver_major) + "." + itos(ver_minor) + "' is too new! Please upgrade to a new engine version: " + local_path + "."); + ERR_FAIL_V_MSG(ERR_FILE_UNRECOGNIZED, + vformat("File '%s' can't be loaded, as it uses a format version (%d) or engine version (%d.%d) which are not supported by your engine version (%s).", + local_path, ver_format, ver_major, ver_minor, VERSION_BRANCH)); } // Since we're not actually converting the file contents, leave the version diff --git a/core/io/resource_importer.cpp b/core/io/resource_importer.cpp index 9ed159bd20..4d980bcf1a 100644 --- a/core/io/resource_importer.cpp +++ b/core/io/resource_importer.cpp @@ -31,6 +31,7 @@ #include "resource_importer.h" #include "core/os/os.h" +#include "core/project_settings.h" #include "core/variant_parser.h" bool ResourceFormatImporter::SortImporterByName::operator()(const Ref<ResourceImporter> &p_a, const Ref<ResourceImporter> &p_b) const { @@ -374,7 +375,7 @@ Ref<ResourceImporter> ResourceFormatImporter::get_importer_by_extension(const St } String ResourceFormatImporter::get_import_base_path(const String &p_for_file) const { - return "res://.import/" + p_for_file.get_file() + "-" + p_for_file.md5_text(); + return ProjectSettings::IMPORTED_FILES_PATH.plus_file(p_for_file.get_file() + "-" + p_for_file.md5_text()); } bool ResourceFormatImporter::are_import_settings_valid(const String &p_path) const { diff --git a/core/list.h b/core/list.h index f850db5241..1cef3c484d 100644 --- a/core/list.h +++ b/core/list.h @@ -395,28 +395,38 @@ public: ERR_FAIL_COND(p_A->data != _data); ERR_FAIL_COND(p_B->data != _data); + if (p_A == p_B) { + return; + } Element *A_prev = p_A->prev_ptr; Element *A_next = p_A->next_ptr; + Element *B_prev = p_B->prev_ptr; + Element *B_next = p_B->next_ptr; - p_A->next_ptr = p_B->next_ptr; - p_A->prev_ptr = p_B->prev_ptr; - - p_B->next_ptr = A_next; - p_B->prev_ptr = A_prev; - - if (p_A->prev_ptr) { - p_A->prev_ptr->next_ptr = p_A; + if (A_prev) { + A_prev->next_ptr = p_B; + } else { + _data->first = p_B; } - if (p_A->next_ptr) { - p_A->next_ptr->prev_ptr = p_A; + if (B_prev) { + B_prev->next_ptr = p_A; + } else { + _data->first = p_A; } - - if (p_B->prev_ptr) { - p_B->prev_ptr->next_ptr = p_B; + if (A_next) { + A_next->prev_ptr = p_B; + } else { + _data->last = p_B; } - if (p_B->next_ptr) { - p_B->next_ptr->prev_ptr = p_B; + if (B_next) { + B_next->prev_ptr = p_A; + } else { + _data->last = p_A; } + p_A->prev_ptr = A_next == p_B ? p_B : B_prev; + p_A->next_ptr = B_next == p_A ? p_B : B_next; + p_B->prev_ptr = B_next == p_A ? p_A : A_prev; + p_B->next_ptr = A_next == p_B ? p_A : A_next; } /** * copy the list diff --git a/core/math/basis.cpp b/core/math/basis.cpp index dd38e25bb1..a712ae7e3e 100644 --- a/core/math/basis.cpp +++ b/core/math/basis.cpp @@ -113,19 +113,22 @@ bool Basis::is_rotation() const { return Math::is_equal_approx(determinant(), 1, UNIT_EPSILON) && is_orthogonal(); } +#ifdef MATH_CHECKS +// This method is only used once, in diagonalize. If it's desired elsewhere, feel free to remove the #ifdef. bool Basis::is_symmetric() const { - if (!Math::is_equal_approx_ratio(elements[0][1], elements[1][0], UNIT_EPSILON)) { + if (!Math::is_equal_approx(elements[0][1], elements[1][0])) { return false; } - if (!Math::is_equal_approx_ratio(elements[0][2], elements[2][0], UNIT_EPSILON)) { + if (!Math::is_equal_approx(elements[0][2], elements[2][0])) { return false; } - if (!Math::is_equal_approx_ratio(elements[1][2], elements[2][1], UNIT_EPSILON)) { + if (!Math::is_equal_approx(elements[1][2], elements[2][1])) { return false; } return true; } +#endif Basis Basis::diagonalize() { //NOTE: only implemented for symmetric matrices @@ -737,18 +740,6 @@ bool Basis::is_equal_approx(const Basis &p_basis) const { return elements[0].is_equal_approx(p_basis.elements[0]) && elements[1].is_equal_approx(p_basis.elements[1]) && elements[2].is_equal_approx(p_basis.elements[2]); } -bool Basis::is_equal_approx_ratio(const Basis &a, const Basis &b, real_t p_epsilon) const { - for (int i = 0; i < 3; i++) { - for (int j = 0; j < 3; j++) { - if (!Math::is_equal_approx_ratio(a.elements[i][j], b.elements[i][j], p_epsilon)) { - return false; - } - } - } - - return true; -} - bool Basis::operator==(const Basis &p_matrix) const { for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { diff --git a/core/math/basis.h b/core/math/basis.h index a86937ceb4..2584f1ff48 100644 --- a/core/math/basis.h +++ b/core/math/basis.h @@ -146,9 +146,6 @@ public: } bool is_equal_approx(const Basis &p_basis) const; - // TODO: Break compatibility in 4.0 by getting rid of this so that it's only an instance method. See also TODO in variant_call.cpp - bool is_equal_approx(const Basis &a, const Basis &b) const { return a.is_equal_approx(b); } - bool is_equal_approx_ratio(const Basis &a, const Basis &b, real_t p_epsilon = UNIT_EPSILON) const; bool operator==(const Basis &p_matrix) const; bool operator!=(const Basis &p_matrix) const; @@ -238,7 +235,9 @@ public: void orthonormalize(); Basis orthonormalized() const; +#ifdef MATH_CHECKS bool is_symmetric() const; +#endif Basis diagonalize(); operator Quat() const { return get_quat(); } diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h index 9f8d4da5b3..f83ee44f4a 100644 --- a/core/math/math_funcs.h +++ b/core/math/math_funcs.h @@ -46,7 +46,8 @@ class Math { public: Math() {} // useless to instance - static const uint64_t RANDOM_MAX = 0xFFFFFFFF; + // Not using 'RANDOM_MAX' to avoid conflict with system headers on some OSes (at least NetBSD). + static const uint64_t RANDOM_32BIT_MAX = 0xFFFFFFFF; static _ALWAYS_INLINE_ double sin(double p_x) { return ::sin(p_x); } static _ALWAYS_INLINE_ float sin(float p_x) { return ::sinf(p_x); } @@ -283,25 +284,13 @@ public: static void randomize(); static uint32_t rand_from_seed(uint64_t *seed); static uint32_t rand(); - static _ALWAYS_INLINE_ double randd() { return (double)rand() / (double)Math::RANDOM_MAX; } - static _ALWAYS_INLINE_ float randf() { return (float)rand() / (float)Math::RANDOM_MAX; } + static _ALWAYS_INLINE_ double randd() { return (double)rand() / (double)Math::RANDOM_32BIT_MAX; } + static _ALWAYS_INLINE_ float randf() { return (float)rand() / (float)Math::RANDOM_32BIT_MAX; } static double random(double from, double to); static float random(float from, float to); static real_t random(int from, int to) { return (real_t)random((real_t)from, (real_t)to); } - static _ALWAYS_INLINE_ bool is_equal_approx_ratio(real_t a, real_t b, real_t epsilon = CMP_EPSILON, real_t min_epsilon = CMP_EPSILON) { - // this is an approximate way to check that numbers are close, as a ratio of their average size - // helps compare approximate numbers that may be very big or very small - real_t diff = abs(a - b); - if (diff == 0.0 || diff < min_epsilon) { - return true; - } - real_t avg_size = (abs(a) + abs(b)) / 2.0; - diff /= avg_size; - return diff < epsilon; - } - static _ALWAYS_INLINE_ bool is_equal_approx(real_t a, real_t b) { // Check for exact equality first, required to handle "infinity" values. if (a == b) { diff --git a/core/math/quat.h b/core/math/quat.h index 8619ea3c5c..3152b7d233 100644 --- a/core/math/quat.h +++ b/core/math/quat.h @@ -224,4 +224,8 @@ bool Quat::operator!=(const Quat &p_quat) const { return x != p_quat.x || y != p_quat.y || z != p_quat.z || w != p_quat.w; } +_FORCE_INLINE_ Quat operator*(const real_t &p_real, const Quat &p_quat) { + return p_quat * p_real; +} + #endif // QUAT_H diff --git a/core/math/random_pcg.h b/core/math/random_pcg.h index 8fd5a056fa..09b13ab74d 100644 --- a/core/math/random_pcg.h +++ b/core/math/random_pcg.h @@ -31,12 +31,12 @@ #ifndef RANDOM_PCG_H #define RANDOM_PCG_H -#include <math.h> - #include "core/math/math_defs.h" #include "thirdparty/misc/pcg.h" +#include <math.h> + #if defined(__GNUC__) #define CLZ32(x) __builtin_clz(x) #elif defined(_MSC_VER) @@ -67,7 +67,6 @@ class RandomPCG { public: static const uint64_t DEFAULT_SEED = 12047754176567800795U; static const uint64_t DEFAULT_INC = PCG_DEFAULT_INC_64; - static const uint64_t RANDOM_MAX = 0xFFFFFFFF; RandomPCG(uint64_t p_seed = DEFAULT_SEED, uint64_t p_inc = DEFAULT_INC); diff --git a/core/math/vector2.h b/core/math/vector2.h index 0966d3392f..f41bcc15bc 100644 --- a/core/math/vector2.h +++ b/core/math/vector2.h @@ -150,7 +150,19 @@ _FORCE_INLINE_ Vector2 Vector2::plane_project(real_t p_d, const Vector2 &p_vec) return p_vec - *this * (dot(p_vec) - p_d); } -_FORCE_INLINE_ Vector2 operator*(real_t p_scalar, const Vector2 &p_vec) { +_FORCE_INLINE_ Vector2 operator*(float p_scalar, const Vector2 &p_vec) { + return p_vec * p_scalar; +} + +_FORCE_INLINE_ Vector2 operator*(double p_scalar, const Vector2 &p_vec) { + return p_vec * p_scalar; +} + +_FORCE_INLINE_ Vector2 operator*(int32_t p_scalar, const Vector2 &p_vec) { + return p_vec * p_scalar; +} + +_FORCE_INLINE_ Vector2 operator*(int64_t p_scalar, const Vector2 &p_vec) { return p_vec * p_scalar; } @@ -304,6 +316,22 @@ struct Vector2i { } }; +_FORCE_INLINE_ Vector2i operator*(const int32_t &p_scalar, const Vector2i &p_vector) { + return p_vector * p_scalar; +} + +_FORCE_INLINE_ Vector2i operator*(const int64_t &p_scalar, const Vector2i &p_vector) { + return p_vector * p_scalar; +} + +_FORCE_INLINE_ Vector2i operator*(const float &p_scalar, const Vector2i &p_vector) { + return p_vector * p_scalar; +} + +_FORCE_INLINE_ Vector2i operator*(const double &p_scalar, const Vector2i &p_vector) { + return p_vector * p_scalar; +} + typedef Vector2i Size2i; typedef Vector2i Point2i; diff --git a/core/message_queue.h b/core/message_queue.h index 7d13e26208..710a605371 100644 --- a/core/message_queue.h +++ b/core/message_queue.h @@ -38,8 +38,7 @@ class MessageQueue { _THREAD_SAFE_CLASS_ enum { - - DEFAULT_QUEUE_SIZE_KB = 1024 + DEFAULT_QUEUE_SIZE_KB = 4096 }; enum { diff --git a/core/object.h b/core/object.h index f9a12da8f6..12ef600dfc 100644 --- a/core/object.h +++ b/core/object.h @@ -658,7 +658,7 @@ public: Variant call(const StringName &p_name, VARIANT_ARG_LIST); // C++ helper void notification(int p_notification, bool p_reversed = false); - String to_string(); + virtual String to_string(); //used mainly by script, get and set all INCLUDING string virtual Variant getvar(const Variant &p_key, bool *r_valid = nullptr) const; diff --git a/core/os/os.cpp b/core/os/os.cpp index dc8bd5ee69..3a398316bd 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -80,10 +80,6 @@ String OS::get_iso_date_time(bool local) const { timezone; } -uint64_t OS::get_splash_tick_msec() const { - return _msec_splash; -} - double OS::get_unix_time() const { return 0; } diff --git a/core/os/os.h b/core/os/os.h index 8e5c0c26e0..4c1d930107 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -52,7 +52,6 @@ class OS { bool _verbose_stdout = false; bool _debug_stdout = false; String _local_clipboard; - uint64_t _msec_splash; bool _no_window = false; int _exit_code = 0; int _orientation; @@ -220,7 +219,6 @@ public: virtual uint64_t get_ticks_usec() const = 0; uint32_t get_ticks_msec() const; - uint64_t get_splash_tick_msec() const; virtual bool is_userfs_persistent() const { return true; } diff --git a/core/project_settings.cpp b/core/project_settings.cpp index efe13e740d..90f56694c2 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -53,6 +53,8 @@ String ProjectSettings::get_resource_path() const { return resource_path; } +const String ProjectSettings::IMPORTED_FILES_PATH("res://.godot/imported"); + String ProjectSettings::localize_path(const String &p_path) const { if (resource_path == "") { return p_path; //not initialized yet diff --git a/core/project_settings.h b/core/project_settings.h index 29b2406dd2..6cbb02d30e 100644 --- a/core/project_settings.h +++ b/core/project_settings.h @@ -41,6 +41,7 @@ class ProjectSettings : public Object { public: typedef Map<String, Variant> CustomMap; + static const String IMPORTED_FILES_PATH; enum { //properties that are not for built in values begin from this value, so builtin ones are displayed first diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp index 4f094dd6c6..a2b3f75bea 100644 --- a/core/register_core_types.cpp +++ b/core/register_core_types.cpp @@ -232,7 +232,7 @@ void register_core_types() { } void register_core_settings() { - //since in register core types, globals may not e present + // Since in register core types, globals may not be present. GLOBAL_DEF("network/limits/tcp/connect_timeout_seconds", (30)); ProjectSettings::get_singleton()->set_custom_property_info("network/limits/tcp/connect_timeout_seconds", PropertyInfo(Variant::INT, "network/limits/tcp/connect_timeout_seconds", PROPERTY_HINT_RANGE, "1,1800,1")); GLOBAL_DEF_RST("network/limits/packet_peer_stream/max_buffer_po2", (16)); diff --git a/core/script_language.cpp b/core/script_language.cpp index b63aeb952c..d535c54dea 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -275,7 +275,13 @@ void ScriptServer::save_global_classes() { gcarr.push_back(d); } - ProjectSettings::get_singleton()->set("_global_script_classes", gcarr); + if (gcarr.empty()) { + if (ProjectSettings::get_singleton()->has_setting("_global_script_classes")) { + ProjectSettings::get_singleton()->clear("_global_script_classes"); + } + } else { + ProjectSettings::get_singleton()->set("_global_script_classes", gcarr); + } ProjectSettings::get_singleton()->save(); } diff --git a/core/translation_po.h b/core/translation_po.h index 730635f63d..88830210ef 100644 --- a/core/translation_po.h +++ b/core/translation_po.h @@ -42,7 +42,7 @@ class TranslationPO : public Translation { // TLDR: Maps context to a list of source strings and translated strings. In PO terms, maps msgctxt to a list of msgid and msgstr. // The first key corresponds to context, and the second key (of the contained HashMap) corresponds to source string. // The value Vector<StringName> in the second map stores the translated strings. Index 0, 1, 2 matches msgstr[0], msgstr[1], msgstr[2]... in the case of plurals. - // Otherwise index 0 mathes to msgstr in a singular translation. + // Otherwise index 0 matches to msgstr in a singular translation. // Strings without context have "" as first key. HashMap<StringName, HashMap<StringName, Vector<StringName>>> translation_map; diff --git a/core/ustring.cpp b/core/ustring.cpp index d5afbc2b47..e382ef3746 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -787,29 +787,46 @@ signed char String::naturalnocasecmp_to(const String &p_str) const { if (!*that_str) { return 1; } else if (IS_DIGIT(*this_str)) { - int64_t this_int, that_int; - if (!IS_DIGIT(*that_str)) { return -1; } - /* Compare the numbers */ - this_int = to_int(this_str, -1, true); - that_int = to_int(that_str, -1, true); - - if (this_int < that_int) { - return -1; - } else if (this_int > that_int) { - return 1; - } + // Keep ptrs to start of numerical sequences + const char32_t *this_substr = this_str; + const char32_t *that_substr = that_str; - /* Skip */ + // Compare lengths of both numerical sequences, ignoring leading zeros while (IS_DIGIT(*this_str)) { this_str++; } while (IS_DIGIT(*that_str)) { that_str++; } + while (*this_substr == '0') { + this_substr++; + } + while (*that_substr == '0') { + that_substr++; + } + int this_len = this_str - this_substr; + int that_len = that_str - that_substr; + + if (this_len < that_len) { + return -1; + } else if (this_len > that_len) { + return 1; + } + + // If lengths equal, compare lexicographically + while (this_substr != this_str && that_substr != that_str) { + if (*this_substr < *that_substr) { + return -1; + } else if (*this_substr > *that_substr) { + return 1; + } + this_substr++; + that_substr++; + } } else if (IS_DIGIT(*that_str)) { return 1; } else { @@ -4484,11 +4501,12 @@ String String::sprintf(const Array &values, bool *error) const { int number_len = str.length(); // Padding. + int pad_chars_count = (value < 0 || show_sign) ? min_chars - 1 : min_chars; String pad_char = pad_with_zeroes ? String("0") : String(" "); if (left_justified) { - str = str.rpad(min_chars, pad_char); + str = str.rpad(pad_chars_count, pad_char); } else { - str = str.lpad(min_chars, pad_char); + str = str.lpad(pad_chars_count, pad_char); } // Sign. diff --git a/core/variant_call.cpp b/core/variant_call.cpp index 0ebb2f04a1..5fd970c8e1 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -1035,7 +1035,7 @@ struct _VariantCall { VCALL_PTR0R(Basis, get_orthogonal_index); VCALL_PTR0R(Basis, orthonormalized); VCALL_PTR2R(Basis, slerp); - VCALL_PTR2R(Basis, is_equal_approx); // TODO: Break compatibility in 4.0 to change this to an instance method (a.is_equal_approx(b) as VCALL_PTR1R) for consistency. + VCALL_PTR1R(Basis, is_equal_approx); VCALL_PTR0R(Basis, get_rotation_quat); VCALL_PTR0R(Transform, inverse); @@ -2356,7 +2356,7 @@ void register_variant_methods() { ADDFUNC1R(BASIS, VECTOR3, Basis, xform_inv, VECTOR3, "v", varray()); ADDFUNC0R(BASIS, INT, Basis, get_orthogonal_index, varray()); ADDFUNC2R(BASIS, BASIS, Basis, slerp, BASIS, "b", FLOAT, "t", varray()); - ADDFUNC2R(BASIS, BOOL, Basis, is_equal_approx, BASIS, "b", FLOAT, "epsilon", varray(CMP_EPSILON)); // TODO: Replace in 4.0, see other TODO. + ADDFUNC1R(BASIS, BOOL, Basis, is_equal_approx, BASIS, "b", varray()); ADDFUNC0R(BASIS, QUAT, Basis, get_rotation_quat, varray()); ADDFUNC0R(TRANSFORM, TRANSFORM, Transform, inverse, varray()); diff --git a/core/variant_op.cpp b/core/variant_op.cpp index ec4eea05bf..533b056f91 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -1031,6 +1031,9 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, case FLOAT: { _RETURN(*reinterpret_cast<const Quat *>(p_a._data._mem) * p_b._data._float); } + case INT: { + _RETURN(*reinterpret_cast<const Quat *>(p_a._data._mem) * p_b._data._int); + } default: _RETURN_FAIL; } @@ -1062,8 +1065,64 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, } } - DEFAULT_OP_NUM_VEC(math, OP_MULTIPLY, INT, *, _int); - DEFAULT_OP_NUM_VEC(math, OP_MULTIPLY, FLOAT, *, _float); + CASE_TYPE(math, OP_MULTIPLY, INT) { + if (p_b.type == INT) { + _RETURN(p_a._data._int * p_b._data._int); + } + if (p_b.type == FLOAT) { + _RETURN(p_a._data._int * p_b._data._float); + } + if (p_b.type == VECTOR2) { + _RETURN(p_a._data._int * *reinterpret_cast<const Vector2 *>(p_b._data._mem)); + } + if (p_b.type == VECTOR3) { + _RETURN(p_a._data._int * *reinterpret_cast<const Vector3 *>(p_b._data._mem)); + } + if (p_b.type == VECTOR2I) { + _RETURN(p_a._data._int * *reinterpret_cast<const Vector2i *>(p_b._data._mem)); + } + if (p_b.type == VECTOR3I) { + _RETURN(p_a._data._int * *reinterpret_cast<const Vector3i *>(p_b._data._mem)); + } + if (p_b.type == QUAT) { + _RETURN(p_a._data._int * *reinterpret_cast<const Quat *>(p_b._data._mem)); + } + if (p_b.type == COLOR) { + _RETURN(p_a._data._int * *reinterpret_cast<const Color *>(p_b._data._mem)); + } + + _RETURN_FAIL + } + + CASE_TYPE(math, OP_MULTIPLY, FLOAT) { + if (p_b.type == INT) { + _RETURN(p_a._data._float * p_b._data._int); + } + if (p_b.type == FLOAT) { + _RETURN(p_a._data._float * p_b._data._float); + } + if (p_b.type == VECTOR2) { + _RETURN(p_a._data._float * *reinterpret_cast<const Vector2 *>(p_b._data._mem)); + } + if (p_b.type == VECTOR3) { + _RETURN(p_a._data._float * *reinterpret_cast<const Vector3 *>(p_b._data._mem)); + } + if (p_b.type == VECTOR2I) { + _RETURN(p_a._data._float * *reinterpret_cast<const Vector2i *>(p_b._data._mem)); + } + if (p_b.type == VECTOR3I) { + _RETURN(p_a._data._float * *reinterpret_cast<const Vector3i *>(p_b._data._mem)); + } + if (p_b.type == QUAT) { + _RETURN(p_a._data._float * *reinterpret_cast<const Quat *>(p_b._data._mem)); + } + if (p_b.type == COLOR) { + _RETURN(p_a._data._float * *reinterpret_cast<const Color *>(p_b._data._mem)); + } + + _RETURN_FAIL + } + DEFAULT_OP_LOCALMEM_NUM(math, OP_MULTIPLY, VECTOR2, *, Vector2); DEFAULT_OP_LOCALMEM_NUM(math, OP_MULTIPLY, VECTOR2I, *, Vector2i); DEFAULT_OP_LOCALMEM_NUM(math, OP_MULTIPLY, VECTOR3, *, Vector3); diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp index 3c4fed68fb..04cd4c1b9b 100644 --- a/core/variant_parser.cpp +++ b/core/variant_parser.cpp @@ -1608,10 +1608,12 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str write(dict[E->get()], p_store_string_func, p_store_string_ud, p_encode_res_func, p_encode_res_ud); if (E->next()) { p_store_string_func(p_store_string_ud, ",\n"); + } else { + p_store_string_func(p_store_string_ud, "\n"); } } - p_store_string_func(p_store_string_ud, "\n}"); + p_store_string_func(p_store_string_ud, "}"); } break; case Variant::ARRAY: { diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index cbc04ca672..c547563a6e 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -4,10 +4,14 @@ Axis-Aligned Bounding Box. </brief_description> <description> - AABB consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. + [AABB] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. + It uses floating-point coordinates. The 2D counterpart to [AABB] is [Rect2]. + [b]Note:[/b] Unlike [Rect2], [AABB] does not have a variant that uses integer coordinates. </description> <tutorials> <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link> + <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link> </tutorials> <methods> <method name="AABB"> diff --git a/doc/classes/AESContext.xml b/doc/classes/AESContext.xml index ff433370bd..f577bab992 100644 --- a/doc/classes/AESContext.xml +++ b/doc/classes/AESContext.xml @@ -5,7 +5,8 @@ </brief_description> <description> This class provides access to AES encryption/decryption of raw data. Both AES-ECB and AES-CBC mode are supported. - [codeblock] + [codeblocks] + [gdscript] extends Node var aes = AESContext.new() @@ -35,7 +36,45 @@ aes.finish() # Check CBC assert(decrypted == data.to_utf8()) - [/codeblock] + [/gdscript] + [csharp] + using Godot; + using System; + using System.Diagnostics; + + public class Example : Node + { + public AESContext Aes = new AESContext(); + public override void _Ready() + { + string key = "My secret key!!!"; // Key must be either 16 or 32 bytes. + string data = "My secret text!!"; // Data size must be multiple of 16 bytes, apply padding if needed. + // Encrypt ECB + Aes.Start(AESContext.Mode.EcbEncrypt, key.ToUTF8()); + byte[] encrypted = Aes.Update(data.ToUTF8()); + Aes.Finish(); + // Decrypt ECB + Aes.Start(AESContext.Mode.EcbDecrypt, key.ToUTF8()); + byte[] decrypted = Aes.Update(encrypted); + Aes.Finish(); + // Check ECB + Debug.Assert(decrypted == data.ToUTF8()); + + string iv = "My secret iv!!!!"; // IV must be of exactly 16 bytes. + // Encrypt CBC + Aes.Start(AESContext.Mode.EcbEncrypt, key.ToUTF8(), iv.ToUTF8()); + encrypted = Aes.Update(data.ToUTF8()); + Aes.Finish(); + // Decrypt CBC + Aes.Start(AESContext.Mode.EcbDecrypt, key.ToUTF8(), iv.ToUTF8()); + decrypted = Aes.Update(encrypted); + Aes.Finish(); + // Check CBC + Debug.Assert(decrypted == data.ToUTF8()); + } + } + [/csharp] + [/codeblocks] </description> <tutorials> </tutorials> diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml index 2695e86f47..0cd7d3dc25 100644 --- a/doc/classes/AStar.xml +++ b/doc/classes/AStar.xml @@ -7,7 +7,8 @@ A* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting short paths among vertices (points), passing through a given set of edges (segments). It enjoys widespread use due to its performance and accuracy. Godot's A* implementation uses points in three-dimensional space and Euclidean distances by default. You must add points manually with [method add_point] and create segments manually with [method connect_points]. Then you can test if there is a path between two points with the [method are_points_connected] function, get a path containing indices by [method get_id_path], or one containing actual coordinates with [method get_point_path]. It is also possible to use non-Euclidean distances. To do so, create a class that extends [code]AStar[/code] and override methods [method _compute_cost] and [method _estimate_cost]. Both take two indices and return a length, as is shown in the following example. - [codeblock] + [codeblocks] + [gdscript] class MyAStar: extends AStar @@ -16,7 +17,21 @@ func _estimate_cost(u, v): return min(0, abs(u - v) - 1) - [/codeblock] + [/gdscript] + [csharp] + public class MyAStar : AStar + { + public override float _ComputeCost(int u, int v) + { + return Mathf.Abs(u - v); + } + public override float _EstimateCost(int u, int v) + { + return Mathf.Min(0, Mathf.Abs(u - v) - 1); + } + } + [/csharp] + [/codeblocks] [method _estimate_cost] should return a lower bound of the distance, i.e. [code]_estimate_cost(u, v) <= _compute_cost(u, v)[/code]. This serves as a hint to the algorithm because the custom [code]_compute_cost[/code] might be computation-heavy. If this is not the case, make [method _estimate_cost] return the same value as [method _compute_cost] to provide the algorithm with the most accurate information. </description> <tutorials> @@ -57,10 +72,16 @@ </argument> <description> Adds a new point at the given position with the given identifier. The algorithm prefers points with lower [code]weight_scale[/code] to form a path. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger. - [codeblock] + [codeblocks] + [gdscript] var astar = AStar.new() astar.add_point(1, Vector3(1, 0, 0), 4) # Adds the point (1, 0, 0) with weight_scale 4 and id 1 - [/codeblock] + [/gdscript] + [csharp] + var astar = new AStar(); + astar.AddPoint(1, new Vector3(1, 0, 0), 4); // Adds the point (1, 0, 0) with weight_scale 4 and id 1 + [/csharp] + [/codeblocks] If there already exists a point for the given [code]id[/code], its position and weight scale are updated to the given values. </description> </method> @@ -95,12 +116,20 @@ </argument> <description> Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction. - [codeblock] + [codeblocks] + [gdscript] var astar = AStar.new() astar.add_point(1, Vector3(1, 1, 0)) astar.add_point(2, Vector3(0, 5, 0)) astar.connect_points(1, 2, false) - [/codeblock] + [/gdscript] + [csharp] + var astar = new AStar(); + astar.AddPoint(1, new Vector3(1, 1, 0)); + astar.AddPoint(2, new Vector3(0, 5, 0)); + astar.ConnectPoints(1, 2, false); + [/csharp] + [/codeblocks] </description> </method> <method name="disconnect_points"> @@ -142,13 +171,22 @@ </argument> <description> Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points. - [codeblock] + [codeblocks] + [gdscript] var astar = AStar.new() astar.add_point(1, Vector3(0, 0, 0)) astar.add_point(2, Vector3(0, 5, 0)) astar.connect_points(1, 2) var res = astar.get_closest_position_in_segment(Vector3(3, 3, 0)) # Returns (0, 3, 0) - [/codeblock] + [/gdscript] + [csharp] + var astar = new AStar(); + astar.AddPoint(1, new Vector3(0, 0, 0)); + astar.AddPoint(2, new Vector3(0, 5, 0)); + astar.ConnectPoints(1, 2); + Vector3 res = astar.GetClosestPositionInSegment(new Vector3(3, 3, 0)); // Returns (0, 3, 0) + [/csharp] + [/codeblocks] The result is in the segment that goes from [code]y = 0[/code] to [code]y = 5[/code]. It's the closest position in the segment to the given point. </description> </method> @@ -161,7 +199,8 @@ </argument> <description> Returns an array with the IDs of the points that form the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path. - [codeblock] + [codeblocks] + [gdscript] var astar = AStar.new() astar.add_point(1, Vector3(0, 0, 0)) astar.add_point(2, Vector3(0, 1, 0), 1) # Default weight is 1 @@ -174,7 +213,20 @@ astar.connect_points(1, 4, false) var res = astar.get_id_path(1, 3) # Returns [1, 2, 3] - [/codeblock] + [/gdscript] + [csharp] + var astar = new AStar(); + astar.AddPoint(1, new Vector3(0, 0, 0)); + astar.AddPoint(2, new Vector3(0, 1, 0), 1); // Default weight is 1 + astar.AddPoint(3, new Vector3(1, 1, 0)); + astar.AddPoint(4, new Vector3(2, 0, 0)); + astar.ConnectPoints(1, 2, false); + astar.ConnectPoints(2, 3, false); + astar.ConnectPoints(4, 3, false); + astar.ConnectPoints(1, 4, false); + int[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3] + [/csharp] + [/codeblocks] If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. </description> </method> @@ -192,7 +244,8 @@ </argument> <description> Returns an array with the IDs of the points that form the connection with the given point. - [codeblock] + [codeblocks] + [gdscript] var astar = AStar.new() astar.add_point(1, Vector3(0, 0, 0)) astar.add_point(2, Vector3(0, 1, 0)) @@ -203,7 +256,19 @@ astar.connect_points(1, 3, true) var neighbors = astar.get_point_connections(1) # Returns [2, 3] - [/codeblock] + [/gdscript] + [csharp] + var astar = new AStar(); + astar.AddPoint(1, new Vector3(0, 0, 0)); + astar.AddPoint(2, new Vector3(0, 1, 0)); + astar.AddPoint(3, new Vector3(1, 1, 0)); + astar.AddPoint(4, new Vector3(2, 0, 0)); + astar.ConnectPoints(1, 2, true); + astar.ConnectPoints(1, 3, true); + + int[] neighbors = astar.GetPointConnections(1); // Returns [2, 3] + [/csharp] + [/codeblocks] </description> </method> <method name="get_point_count" qualifiers="const"> diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml index 622d336ef6..1540d8dacc 100644 --- a/doc/classes/AStar2D.xml +++ b/doc/classes/AStar2D.xml @@ -44,10 +44,16 @@ </argument> <description> Adds a new point at the given position with the given identifier. The algorithm prefers points with lower [code]weight_scale[/code] to form a path. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger. - [codeblock] + [codeblocks] + [gdscript] var astar = AStar2D.new() astar.add_point(1, Vector2(1, 0), 4) # Adds the point (1, 0) with weight_scale 4 and id 1 - [/codeblock] + [/gdscript] + [csharp] + var astar = new AStar2D(); + astar.AddPoint(1, new Vector2(1, 0), 4); // Adds the point (1, 0) with weight_scale 4 and id 1 + [/csharp] + [/codeblocks] If there already exists a point for the given [code]id[/code], its position and weight scale are updated to the given values. </description> </method> @@ -80,12 +86,20 @@ </argument> <description> Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction. - [codeblock] + [codeblocks] + [gdscript] var astar = AStar2D.new() astar.add_point(1, Vector2(1, 1)) astar.add_point(2, Vector2(0, 5)) astar.connect_points(1, 2, false) - [/codeblock] + [/gdscript] + [csharp] + var astar = new AStar2D(); + astar.AddPoint(1, new Vector2(1, 1)); + astar.AddPoint(2, new Vector2(0, 5)); + astar.ConnectPoints(1, 2, false); + [/csharp] + [/codeblocks] </description> </method> <method name="disconnect_points"> @@ -125,13 +139,22 @@ </argument> <description> Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points. - [codeblock] + [codeblocks] + [gdscript] var astar = AStar2D.new() astar.add_point(1, Vector2(0, 0)) astar.add_point(2, Vector2(0, 5)) astar.connect_points(1, 2) var res = astar.get_closest_position_in_segment(Vector2(3, 3)) # Returns (0, 3) - [/codeblock] + [/gdscript] + [csharp] + var astar = new AStar2D(); + astar.AddPoint(1, new Vector2(0, 0)); + astar.AddPoint(2, new Vector2(0, 5)); + astar.ConnectPoints(1, 2); + Vector2 res = astar.GetClosestPositionInSegment(new Vector2(3, 3)); // Returns (0, 3) + [/csharp] + [/codeblocks] The result is in the segment that goes from [code]y = 0[/code] to [code]y = 5[/code]. It's the closest position in the segment to the given point. </description> </method> @@ -144,7 +167,8 @@ </argument> <description> Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. - [codeblock] + [codeblocks] + [gdscript] var astar = AStar2D.new() astar.add_point(1, Vector2(0, 0)) astar.add_point(2, Vector2(0, 1), 1) # Default weight is 1 @@ -157,7 +181,21 @@ astar.connect_points(1, 4, false) var res = astar.get_id_path(1, 3) # Returns [1, 2, 3] - [/codeblock] + [/gdscript] + [csharp] + var astar = new AStar2D(); + astar.AddPoint(1, new Vector2(0, 0)); + astar.AddPoint(2, new Vector2(0, 1), 1); // Default weight is 1 + astar.AddPoint(3, new Vector2(1, 1)); + astar.AddPoint(4, new Vector2(2, 0)); + + astar.ConnectPoints(1, 2, false); + astar.ConnectPoints(2, 3, false); + astar.ConnectPoints(4, 3, false); + astar.ConnectPoints(1, 4, false); + int[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3] + [/csharp] + [/codeblocks] If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. </description> </method> @@ -175,7 +213,8 @@ </argument> <description> Returns an array with the IDs of the points that form the connection with the given point. - [codeblock] + [codeblocks] + [gdscript] var astar = AStar2D.new() astar.add_point(1, Vector2(0, 0)) astar.add_point(2, Vector2(0, 1)) @@ -186,7 +225,20 @@ astar.connect_points(1, 3, true) var neighbors = astar.get_point_connections(1) # Returns [2, 3] - [/codeblock] + [/gdscript] + [csharp] + var astar = new AStar2D(); + astar.AddPoint(1, new Vector2(0, 0)); + astar.AddPoint(2, new Vector2(0, 1)); + astar.AddPoint(3, new Vector2(1, 1)); + astar.AddPoint(4, new Vector2(2, 0)); + + astar.ConnectPoints(1, 2, true); + astar.ConnectPoints(1, 3, true); + + int[] neighbors = astar.GetPointConnections(1); // Returns [2, 3] + [/csharp] + [/codeblocks] </description> </method> <method name="get_point_count" qualifiers="const"> diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index 6b1864b679..e5eb216062 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -76,6 +76,7 @@ <signals> <signal name="cancelled"> <description> + Emitted when the dialog is closed or the button created with [method add_cancel] is pressed. </description> </signal> <signal name="confirmed"> diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml index e23a4fe9f8..39228eab79 100644 --- a/doc/classes/AnimatedSprite2D.xml +++ b/doc/classes/AnimatedSprite2D.xml @@ -9,6 +9,7 @@ </description> <tutorials> <link title="2D Sprite animation">https://docs.godotengine.org/en/latest/tutorials/2d/2d_sprite_animation.html</link> + <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> </tutorials> <methods> <method name="is_playing" qualifiers="const"> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index 0a2925e6d5..ceef16f158 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -5,7 +5,8 @@ </brief_description> <description> An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track. - [codeblock] + [codeblocks] + [gdscript] # This creates an animation that makes the node "Enemy" move to the right by # 100 pixels in 0.5 seconds. var animation = Animation.new() @@ -13,7 +14,17 @@ animation.track_set_path(track_index, "Enemy:position:x") animation.track_insert_key(track_index, 0.0, 0) animation.track_insert_key(track_index, 0.5, 100) - [/codeblock] + [/gdscript] + [csharp] + // This creates an animation that makes the node "Enemy" move to the right by + // 100 pixels in 0.5 seconds. + var animation = new Animation(); + int trackIndex = animation.AddTrack(Animation.TrackType.Value); + animation.TrackSetPath(trackIndex, "Enemy:position:x"); + animation.TrackInsertKey(trackIndex, 0.0f, 0); + animation.TrackInsertKey(trackIndex, 0.5f, 100); + [/csharp] + [/codeblocks] Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check [enum TrackType] to see available types. </description> <tutorials> @@ -681,6 +692,17 @@ Sets the update mode (see [enum UpdateMode]) of a value track. </description> </method> + <method name="value_track_interpolate" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="track_idx" type="int"> + </argument> + <argument index="1" name="time_sec" type="float"> + </argument> + <description> + Returns the interpolated value at the given time (in seconds). The [code]track_idx[/code] must be the index of a value track. + </description> + </method> </methods> <members> <member name="length" type="float" setter="set_length" getter="get_length" default="1.0"> diff --git a/doc/classes/AnimationNodeAdd3.xml b/doc/classes/AnimationNodeAdd3.xml index 94a6ae4221..0e49ac7bbf 100644 --- a/doc/classes/AnimationNodeAdd3.xml +++ b/doc/classes/AnimationNodeAdd3.xml @@ -12,6 +12,7 @@ </description> <tutorials> <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml index d8ac5413fd..3f0843c112 100644 --- a/doc/classes/AnimationNodeAnimation.xml +++ b/doc/classes/AnimationNodeAnimation.xml @@ -8,6 +8,8 @@ </description> <tutorials> <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeBlend2.xml b/doc/classes/AnimationNodeBlend2.xml index e2cd12e685..e509a2df6c 100644 --- a/doc/classes/AnimationNodeBlend2.xml +++ b/doc/classes/AnimationNodeBlend2.xml @@ -8,6 +8,8 @@ </description> <tutorials> <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml index 460c11cc5e..abbc8cb2e6 100644 --- a/doc/classes/AnimationNodeBlendSpace2D.xml +++ b/doc/classes/AnimationNodeBlendSpace2D.xml @@ -10,6 +10,7 @@ </description> <tutorials> <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="add_blend_point"> diff --git a/doc/classes/AnimationNodeOneShot.xml b/doc/classes/AnimationNodeOneShot.xml index d5793e5839..65ab363e1f 100644 --- a/doc/classes/AnimationNodeOneShot.xml +++ b/doc/classes/AnimationNodeOneShot.xml @@ -8,6 +8,7 @@ </description> <tutorials> <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="get_mix_mode" qualifiers="const"> diff --git a/doc/classes/AnimationNodeOutput.xml b/doc/classes/AnimationNodeOutput.xml index 7640f4dcfa..c4150d7e82 100644 --- a/doc/classes/AnimationNodeOutput.xml +++ b/doc/classes/AnimationNodeOutput.xml @@ -7,6 +7,8 @@ </description> <tutorials> <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml index 9ea83d2c5e..e08e288c59 100644 --- a/doc/classes/AnimationNodeStateMachine.xml +++ b/doc/classes/AnimationNodeStateMachine.xml @@ -6,10 +6,16 @@ <description> Contains multiple nodes representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the [AnimationNodeStateMachinePlayback] object from the [AnimationTree] node to control it programmatically. [b]Example:[/b] - [codeblock] + [codeblocks] + [gdscript] var state_machine = $AnimationTree.get("parameters/playback") state_machine.travel("some_state") - [/codeblock] + [/gdscript] + [csharp] + var stateMachine = GetNode<AnimationTree>("AnimationTree").Get("parameters/playback") as AnimationNodeStateMachinePlayback; + stateMachine.Travel("some_state"); + [/csharp] + [/codeblocks] </description> <tutorials> <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml index fec68d5b74..60ff425cdb 100644 --- a/doc/classes/AnimationNodeStateMachinePlayback.xml +++ b/doc/classes/AnimationNodeStateMachinePlayback.xml @@ -6,10 +6,16 @@ <description> Allows control of [AnimationTree] state machines created with [AnimationNodeStateMachine]. Retrieve with [code]$AnimationTree.get("parameters/playback")[/code]. [b]Example:[/b] - [codeblock] + [codeblocks] + [gdscript] var state_machine = $AnimationTree.get("parameters/playback") state_machine.travel("some_state") - [/codeblock] + [/gdscript] + [csharp] + var stateMachine = GetNode<AnimationTree>("AnimationTree").Get("parameters/playback") as AnimationNodeStateMachinePlayback; + stateMachine.Travel("some_state"); + [/csharp] + [/codeblocks] </description> <tutorials> <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml index fe0154acad..2f0ebd7de6 100644 --- a/doc/classes/AnimationNodeStateMachineTransition.xml +++ b/doc/classes/AnimationNodeStateMachineTransition.xml @@ -12,9 +12,14 @@ <members> <member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="@"""> Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]: - [codeblock] - $animation_tree["parameters/conditions/idle"] = is_on_floor and (linear_velocity.x == 0) - [/codeblock] + [codeblocks] + [gdscript] + $animation_tree.set("parameters/conditions/idle", is_on_floor and (linear_velocity.x == 0)) + [/gdscript] + [csharp] + GetNode<AnimationTree>("animation_tree").Set("parameters/conditions/idle", IsOnFloor && (LinearVelocity.x == 0)); + [/csharp] + [/codeblocks] </member> <member name="auto_advance" type="bool" setter="set_auto_advance" getter="has_auto_advance" default="false"> Turn on the transition automatically when this state is reached. This works best with [constant SWITCH_MODE_AT_END]. diff --git a/doc/classes/AnimationNodeTimeScale.xml b/doc/classes/AnimationNodeTimeScale.xml index 334fdb0b95..2ce8309418 100644 --- a/doc/classes/AnimationNodeTimeScale.xml +++ b/doc/classes/AnimationNodeTimeScale.xml @@ -8,6 +8,7 @@ </description> <tutorials> <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml index 8338f0d39a..73c7006768 100644 --- a/doc/classes/AnimationNodeTransition.xml +++ b/doc/classes/AnimationNodeTransition.xml @@ -8,6 +8,8 @@ </description> <tutorials> <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="get_input_caption" qualifiers="const"> diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 8396cdb6cf..de2087d930 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -9,9 +9,9 @@ Updating the target properties of animations occurs at process time. </description> <tutorials> - <link title="Animations">https://docs.godotengine.org/en/latest/getting_started/step_by_step/animations.html</link> <link title="2D Sprite animation">https://docs.godotengine.org/en/latest/tutorials/2d/2d_sprite_animation.html</link> <link title="Animation tutorial index">https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="add_animation"> diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml index cc8e83f509..262b5addb7 100644 --- a/doc/classes/AnimationTree.xml +++ b/doc/classes/AnimationTree.xml @@ -8,7 +8,7 @@ </description> <tutorials> <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> - <link title="Third-person shooter demo code repository">https://github.com/godotengine/tps-demo</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="advance"> diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index e98c0af0d9..4f8d102393 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -8,6 +8,9 @@ </description> <tutorials> <link title="Using Area2D">https://docs.godotengine.org/en/latest/tutorials/physics/using_area_2d.html</link> + <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> + <link title="2D Pong Demo">https://godotengine.org/asset-library/asset/121</link> + <link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link> </tutorials> <methods> <method name="get_collision_layer_bit" qualifiers="const"> diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml index ad9eff3a64..db1c96c8cb 100644 --- a/doc/classes/Area3D.xml +++ b/doc/classes/Area3D.xml @@ -7,6 +7,8 @@ 3D area that detects [CollisionObject3D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping). </description> <tutorials> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> + <link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link> </tutorials> <methods> <method name="get_collision_layer_bit" qualifiers="const"> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 20579e0159..87b7443a8a 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -6,20 +6,38 @@ <description> Generic array which can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.). [b]Example:[/b] - [codeblock] + [codeblocks] + [gdscript] var array = ["One", 2, 3, "Four"] print(array[0]) # One. print(array[2]) # 3. print(array[-1]) # Four. array[2] = "Three" print(array[-2]) # Three. - [/codeblock] + [/gdscript] + [csharp] + var array = new Godot.Collections.Array{"One", 2, 3, "Four"}; + GD.Print(array[0]); // One. + GD.Print(array[2]); // 3. + GD.Print(array[array.Count - 1]); // Four. + array[2] = "Three"; + GD.Print(array[array.Count - 2]); // Three. + [/csharp] + [/codeblocks] Arrays can be concatenated using the [code]+[/code] operator: - [codeblock] + [codeblocks] + [gdscript] var array1 = ["One", 2] var array2 = [3, "Four"] print(array1 + array2) # ["One", 2, 3, "Four"] - [/codeblock] + [/gdscript] + [csharp] + // Array concatenation is not possible with C# arrays, but is with Godot.Collections.Array. + var array1 = new Godot.Collections.Array("One", 2); + var array2 = new Godot.Collections.Array(3, "Four"); + GD.Print(array1 + array2); // Prints [One, 2, 3, Four] + [/csharp] + [/codeblocks] [b]Note:[/b] Arrays are always passed by reference. To get a copy of an array which can be modified independently of the original array, use [method duplicate]. </description> <tutorials> @@ -228,18 +246,39 @@ </argument> <description> Returns [code]true[/code] if the array contains the given value. - [codeblock] + [codeblocks] + [gdscript] print(["inside", 7].has("inside")) # True print(["inside", 7].has("outside")) # False print(["inside", 7].has(7)) # True print(["inside", 7].has("7")) # False - [/codeblock] + [/gdscript] + [csharp] + var arr = new Godot.Collections.Array{"inside", 7}; + // has is renamed to Contains + GD.Print(arr.Contains("inside")); // True + GD.Print(arr.Contains("outside")); // False + GD.Print(arr.Contains(7)); // True + GD.Print(arr.Contains("7")); // False + [/csharp] + [/codeblocks] + [b]Note:[/b] This is equivalent to using the [code]in[/code] operator as follows: - [codeblock] + [codeblocks] + [gdscript] # Will evaluate to `true`. if 2 in [2, 4, 6, 8]: - pass - [/codeblock] + print("Containes!") + [/gdscript] + [csharp] + // As there is no "in" keyword in C#, you have to use Contains + var array = new Godot.Collections.Array{2, 4, 6, 8}; + if (array.Contains(2)) + { + GD.Print("Containes!"); + } + [/csharp] + [/codeblocks] </description> </method> <method name="hash"> @@ -292,7 +331,7 @@ <return type="Variant"> </return> <description> - Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty, wwithout printing an error message. + Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. </description> </method> <method name="push_back"> @@ -377,11 +416,16 @@ <description> Sorts the array. [b]Note:[/b] Strings are sorted in alphabetical order (as opposed to natural order). This may lead to unexpected behavior when sorting an array of strings ending with a sequence of numbers. Consider the following example: - [codeblock] + [codeblocks] + [gdscript] var strings = ["string1", "string2", "string10", "string11"] strings.sort() print(strings) # Prints [string1, string10, string11, string2] - [/codeblock] + [/gdscript] + [csharp] + // There is no sort support for Godot.Collections.Array + [/csharp] + [/codeblocks] </description> </method> <method name="sort_custom"> @@ -394,7 +438,8 @@ <description> Sorts the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code]. [b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior. - [codeblock] + [codeblocks] + [gdscript] class MyCustomSorter: static func sort_ascending(a, b): if a[0] < b[0]: @@ -404,7 +449,11 @@ var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]] my_items.sort_custom(MyCustomSorter, "sort_ascending") print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]]. - [/codeblock] + [/gdscript] + [csharp] + // There is no custom sort support for Godot.Collections.Array + [/csharp] + [/codeblocks] </description> </method> </methods> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 4ec39ecc2f..4edf69ccb2 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -6,21 +6,42 @@ <description> The [ArrayMesh] is used to construct a [Mesh] by specifying the attributes as arrays. The most basic example is the creation of a single triangle: - [codeblock] + [codeblocks] + [gdscript] var vertices = PackedVector3Array() vertices.push_back(Vector3(0, 1, 0)) vertices.push_back(Vector3(1, 0, 0)) vertices.push_back(Vector3(0, 0, 1)) + # Initialize the ArrayMesh. var arr_mesh = ArrayMesh.new() var arrays = [] arrays.resize(ArrayMesh.ARRAY_MAX) arrays[ArrayMesh.ARRAY_VERTEX] = vertices + # Create the Mesh. arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays) var m = MeshInstance3D.new() m.mesh = arr_mesh - [/codeblock] + [/gdscript] + [csharp] + var vertices = new Godot.Collections.Array<Vector3>(); + vertices.Add(new Vector3(0, 1, 0)); + vertices.Add(new Vector3(1, 0, 0)); + vertices.Add(new Vector3(0, 0, 1)); + + // Initialize the ArrayMesh. + var arrMesh = new ArrayMesh(); + var arrays = new Godot.Collections.Array(); + arrays.Resize((int)ArrayMesh.ArrayType.Max); + arrays[(int)ArrayMesh.ArrayType.Vertex] = vertices; + + // Create the Mesh. + arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, arrays); + var m = new MeshInstance(); + m.Mesh = arrMesh; + [/csharp] + [/codeblocks] The [MeshInstance3D] is ready to be added to the [SceneTree] to be shown. See also [ImmediateGeometry3D], [MeshDataTool] and [SurfaceTool] for procedural geometry generation. [b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes. diff --git a/doc/classes/AudioEffect.xml b/doc/classes/AudioEffect.xml index 60bf15ce57..955285bd2e 100644 --- a/doc/classes/AudioEffect.xml +++ b/doc/classes/AudioEffect.xml @@ -7,6 +7,7 @@ Base resource for audio bus. Applies an audio effect on the bus that the resource is applied on. </description> <tutorials> + <link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AudioEffectHighShelfFilter.xml b/doc/classes/AudioEffectHighShelfFilter.xml index cf620e4417..4ba31f9fc8 100644 --- a/doc/classes/AudioEffectHighShelfFilter.xml +++ b/doc/classes/AudioEffectHighShelfFilter.xml @@ -1,10 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" version="4.0"> <brief_description> + Reduces all frequencies above the [member AudioEffectFilter.cutoff_hz]. </brief_description> <description> </description> <tutorials> + <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AudioEffectLowShelfFilter.xml b/doc/classes/AudioEffectLowShelfFilter.xml index 7cf09b0f05..078e7bf1a1 100644 --- a/doc/classes/AudioEffectLowShelfFilter.xml +++ b/doc/classes/AudioEffectLowShelfFilter.xml @@ -1,10 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" version="4.0"> <brief_description> + Reduces all frequencies below the [member AudioEffectFilter.cutoff_hz]. </brief_description> <description> </description> <tutorials> + <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AudioEffectRecord.xml b/doc/classes/AudioEffectRecord.xml index 6617d16290..872ddf3b0f 100644 --- a/doc/classes/AudioEffectRecord.xml +++ b/doc/classes/AudioEffectRecord.xml @@ -8,6 +8,7 @@ </description> <tutorials> <link title="Recording with microphone">https://docs.godotengine.org/en/latest/tutorials/audio/recording_with_microphone.html</link> + <link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link> </tutorials> <methods> <method name="get_recording" qualifiers="const"> diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml index 26eb2be753..fbe68cde0e 100644 --- a/doc/classes/AudioEffectReverb.xml +++ b/doc/classes/AudioEffectReverb.xml @@ -8,6 +8,7 @@ Simulates rooms of different sizes. Its parameters can be adjusted to simulate the sound of a specific room. </description> <tutorials> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml index d5fd5d8f00..dafc0065f6 100644 --- a/doc/classes/AudioServer.xml +++ b/doc/classes/AudioServer.xml @@ -8,6 +8,9 @@ </description> <tutorials> <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link> + <link title="Audio Device Changer Demo">https://godotengine.org/asset-library/asset/525</link> + <link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link> + <link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link> </tutorials> <methods> <method name="add_bus"> diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml index 58768dc008..bbfec579bb 100644 --- a/doc/classes/AudioStream.xml +++ b/doc/classes/AudioStream.xml @@ -8,6 +8,9 @@ </description> <tutorials> <link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> + <link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link> + <link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link> + <link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link> </tutorials> <methods> <method name="get_length" qualifiers="const"> diff --git a/doc/classes/AudioStreamGenerator.xml b/doc/classes/AudioStreamGenerator.xml index 51254f9305..a273beb5af 100644 --- a/doc/classes/AudioStreamGenerator.xml +++ b/doc/classes/AudioStreamGenerator.xml @@ -5,7 +5,7 @@ <description> </description> <tutorials> - <link title="Audio generator demo project">https://github.com/godotengine/godot-demo-projects/tree/master/audio/generator</link> + <link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml index f928d54526..da75ff206c 100644 --- a/doc/classes/AudioStreamPlayback.xml +++ b/doc/classes/AudioStreamPlayback.xml @@ -7,6 +7,7 @@ Can play, loop, pause a scroll through audio. See [AudioStream] and [AudioStreamOGGVorbis] for usage. </description> <tutorials> + <link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index 86048ca8c1..55190c5f9f 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -8,6 +8,11 @@ </description> <tutorials> <link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> + <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> + <link title="Audio Device Changer Demo">https://godotengine.org/asset-library/asset/525</link> + <link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link> + <link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link> + <link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link> </tutorials> <methods> <method name="get_playback_position"> diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 0cb0b7e57e..8c92975b9c 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -122,6 +122,7 @@ </member> <member name="billboard_mode" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="BaseMaterial3D.BillboardMode" default="0"> Controls how the object faces the camera. See [enum BillboardMode]. + [b]Note:[/b] Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See [url=https://github.com/godotengine/godot/issues/41567]GitHub issue #41567[/url] for details. </member> <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="BaseMaterial3D.BlendMode" default="0"> The material's blend mode. @@ -174,10 +175,12 @@ If [code]true[/code], the object receives no shadow that would otherwise be cast onto it. </member> <member name="distance_fade_max_distance" type="float" setter="set_distance_fade_max_distance" getter="get_distance_fade_max_distance"> - Distance at which the object fades fully and is no longer visible. + Distance at which the object appears fully opaque. + [b]Note:[/b] If [code]distance_fade_max_distance[/code] is less than [code]distance_fade_min_distance[/code], the behavior will be reversed. The object will start to fade away at [code]distance_fade_max_distance[/code] and will fully disappear once it reaches [code]distance_fade_min_distance[/code]. </member> <member name="distance_fade_min_distance" type="float" setter="set_distance_fade_min_distance" getter="get_distance_fade_min_distance"> - Distance at which the object starts to fade. If the object is less than this distance away it will appear normal. + Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible. + [b]Note:[/b] If [code]distance_fade_min_distance[/code] is greater than [code]distance_fade_max_distance[/code], the behavior will be reversed. The object will start to fade away at [code]distance_fade_max_distance[/code] and will fully disappear once it reaches [code]distance_fade_min_distance[/code]. </member> <member name="distance_fade_mode" type="int" setter="set_distance_fade" getter="get_distance_fade" enum="BaseMaterial3D.DistanceFadeMode" default="0"> Specifies which type of fade to use. Can be any of the [enum DistanceFadeMode]s. diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index c614a281ae..faea2f78b8 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -10,8 +10,13 @@ For more information, read the "Matrices and transforms" documentation article. </description> <tutorials> + <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> <link title="Matrices and transforms">https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link> <link title="Using 3D transforms">https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link> + <link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> + <link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link> </tutorials> <methods> <method name="Basis"> diff --git a/doc/classes/BoxShape3D.xml b/doc/classes/BoxShape3D.xml index fd08da148d..d8cbd8b980 100644 --- a/doc/classes/BoxShape3D.xml +++ b/doc/classes/BoxShape3D.xml @@ -7,6 +7,9 @@ 3D box shape that can be a child of a [PhysicsBody3D] or [Area3D]. </description> <tutorials> + <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> + <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> </tutorials> <methods> </methods> diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index de05cfcd13..df47fa8bec 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -6,7 +6,8 @@ <description> Button is the standard themed button. It can contain text and an icon, and will display them according to the current [Theme]. [b]Example of creating a button and assigning an action when pressed by code:[/b] - [codeblock] + [codeblocks] + [gdscript] func _ready(): var button = Button.new() button.text = "Click me" @@ -15,10 +16,28 @@ func _button_pressed(): print("Hello world!") - [/codeblock] + [/gdscript] + [csharp] + public override void _Ready() + { + var button = new Button(); + button.Text = "Click me"; + button.Connect("pressed", this, nameof(ButtonPressed)); + AddChild(button); + } + + private void ButtonPressed() + { + GD.Print("Hello world!"); + } + [/csharp] + [/codeblocks] Buttons (like all Control nodes) can also be created in the editor, but some situations may require creating them from code. + See also [BaseButton] which contains common properties and methods associated with this node. </description> <tutorials> + <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> + <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> </tutorials> <methods> </methods> diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml index 3cc74beb58..3bbee993ac 100644 --- a/doc/classes/Callable.xml +++ b/doc/classes/Callable.xml @@ -6,15 +6,32 @@ <description> [Callable] is a first class object which can be held in variables and passed to functions. It represents a given method in an [Object], and is typically used for signal callbacks. [b]Example:[/b] - [codeblock] + [codeblocks] + [gdscript] var callable = Callable(self, "print_args") func print_args(arg1, arg2, arg3 = ""): prints(arg1, arg2, arg3) + func test(): callable.call("hello", "world") # Prints "hello world". callable.call(Vector2.UP, 42, callable) # Prints "(0, -1) 42 Node(Node.gd)::print_args". callable.call("invalid") # Invalid call, should have at least 2 arguments. - [/codeblock] + [/gdscript] + [csharp] + Callable callable = new Callable(this, "print_args"); + public void PrintArgs(object arg1, object arg2, object arg3 = "") + { + GD.PrintS(arg1, arg2, arg3); + } + + public void Test() + { + callable.Call("hello", "world"); // Prints "hello world". + callable.Call(Vector2.Up, 42, callable); // Prints "(0, -1) 42 Node(Node.gd)::print_args". + callable.Call("invalid"); // Invalid call, should have at least 2 arguments. + } + [/csharp] + [/codeblocks] </description> <tutorials> </tutorials> diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index ad49216b34..c7ee915109 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -9,6 +9,9 @@ Note that the [Camera2D] node's [code]position[/code] doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use [method get_camera_screen_center] to get the real position. </description> <tutorials> + <link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link> + <link title="2D Isometric Demo">https://godotengine.org/asset-library/asset/112</link> + <link title="2D HDR Demo">https://godotengine.org/asset-library/asset/110</link> </tutorials> <methods> <method name="align"> diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml index 598b4bd685..b6a108fb25 100644 --- a/doc/classes/Camera3D.xml +++ b/doc/classes/Camera3D.xml @@ -7,6 +7,7 @@ [Camera3D] is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. In other words, a camera just provides 3D display capabilities to a [Viewport], and, without one, a scene registered in that [Viewport] (or higher viewports) can't be displayed. </description> <tutorials> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="clear_current"> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 0eecada4fe..d36a997330 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -14,6 +14,7 @@ <tutorials> <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> <link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link> + <link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link> </tutorials> <methods> <method name="_draw" qualifiers="virtual"> @@ -318,13 +319,22 @@ <description> Draws [code]text[/code] using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. [b]Example using the default project font:[/b] - [codeblock] + [codeblocks] + [gdscript] # If using this method in a script that redraws constantly, move the # `default_font` declaration to a member variable assigned in `_ready()` # so the Control is only created once. var default_font = Control.new().get_font("font") draw_string(default_font, Vector2(64, 64), "Hello world") - [/codeblock] + [/gdscript] + [csharp] + // If using this method in a script that redraws constantly, move the + // `default_font` declaration to a member variable assigned in `_ready()` + // so the Control is only created once. + Font defaultFont = new Control().GetFont("font"); + DrawString(defaultFont, new Vector2(64, 64), "Hello world"); + [/csharp] + [/codeblocks] See also [method Font.draw]. </description> </method> @@ -516,13 +526,6 @@ Returns [code]true[/code] if local transform notifications are communicated to children. </description> </method> - <method name="is_set_as_toplevel" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns [code]true[/code] if the node is set as top-level. See [method set_as_toplevel]. - </description> - </method> <method name="is_transform_notification_enabled" qualifiers="const"> <return type="bool"> </return> @@ -555,15 +558,6 @@ Transformations issued by [code]event[/code]'s inputs are applied in local space instead of global space. </description> </method> - <method name="set_as_toplevel"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> - <description> - If [code]enable[/code] is [code]true[/code], the node won't inherit its transform from parent canvas items. - </description> - </method> <method name="set_notify_local_transform"> <return type="void"> </return> @@ -613,6 +607,9 @@ <member name="show_behind_parent" type="bool" setter="set_draw_behind_parent" getter="is_draw_behind_parent_enabled" default="false"> If [code]true[/code], the object draws behind its parent. </member> + <member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level"> + If [code]true[/code], the node will not inherit its transform from parent [CanvasItem]s. + </member> <member name="show_on_top" type="bool" setter="_set_on_top" getter="_is_on_top"> If [code]true[/code], the object draws on top of its parent. </member> diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml index 89cd28b617..9d952cdba3 100644 --- a/doc/classes/CanvasLayer.xml +++ b/doc/classes/CanvasLayer.xml @@ -9,6 +9,7 @@ <tutorials> <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> <link title="Canvas layers">https://docs.godotengine.org/en/latest/tutorials/2d/canvas_layers.html</link> + <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> </tutorials> <methods> <method name="get_canvas" qualifiers="const"> diff --git a/doc/classes/CapsuleShape3D.xml b/doc/classes/CapsuleShape3D.xml index f56d94dc63..27a6242bc9 100644 --- a/doc/classes/CapsuleShape3D.xml +++ b/doc/classes/CapsuleShape3D.xml @@ -7,6 +7,7 @@ Capsule shape for collisions. </description> <tutorials> + <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> </tutorials> <methods> </methods> diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml index a988035c36..d1759adf30 100644 --- a/doc/classes/CharFXTransform.xml +++ b/doc/classes/CharFXTransform.xml @@ -18,11 +18,18 @@ </member> <member name="character" type="int" setter="set_character" getter="get_character" default="0"> The Unicode codepoint the character will use. This only affects non-whitespace characters. [method @GDScript.ord] can be useful here. For example, the following will replace all characters with asterisks: - [codeblock] + [codeblocks] + [gdscript] # `char_fx` is the CharFXTransform parameter from `_process_custom_fx()`. # See the RichTextEffect documentation for details. char_fx.character = ord("*") - [/codeblock] + [/gdscript] + [csharp] + // `char_fx` is the CharFXTransform parameter from `_process_custom_fx()`. + // See the RichTextEffect documentation for details. + charFx.Character = char.GetNumericValue('*'); + [/csharp] + [/codeblocks] </member> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )"> The color the character will be drawn with. diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml index 9c42091eb8..f912bb98c9 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -5,6 +5,7 @@ </brief_description> <description> A checkbox allows the user to make a binary choice (choosing only one of two possible options). It's similar to [CheckButton] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckBox when toggling it has [b]no[/b] immediate effect on something. For instance, it should be used when toggling it will only do something once a confirmation button is pressed. + See also [BaseButton] which contains common properties and methods associated with this node. </description> <tutorials> </tutorials> diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml index 514ff9a691..b4f91cf3a8 100644 --- a/doc/classes/CheckButton.xml +++ b/doc/classes/CheckButton.xml @@ -5,6 +5,7 @@ </brief_description> <description> CheckButton is a toggle button displayed as a check field. It's similar to [CheckBox] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckButton when toggling it has an [b]immediate[/b] effect on something. For instance, it should be used if toggling it enables/disables a setting without requiring the user to press a confirmation button. + See also [BaseButton] which contains common properties and methods associated with this node. </description> <tutorials> </tutorials> diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml index b4fcf9cd88..c03eba82ff 100644 --- a/doc/classes/CollisionShape2D.xml +++ b/doc/classes/CollisionShape2D.xml @@ -8,6 +8,9 @@ </description> <tutorials> <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> + <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> + <link title="2D Pong Demo">https://godotengine.org/asset-library/asset/121</link> + <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link> </tutorials> <methods> </methods> diff --git a/doc/classes/CollisionShape3D.xml b/doc/classes/CollisionShape3D.xml index 177900dd4f..5590947a4f 100644 --- a/doc/classes/CollisionShape3D.xml +++ b/doc/classes/CollisionShape3D.xml @@ -8,6 +8,9 @@ </description> <tutorials> <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> + <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="make_convex_from_siblings"> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index fcaba99eb7..ef438e422a 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -8,8 +8,12 @@ You can also create a color from standardized color names by using [method @GDScript.ColorN] or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url]. If you want to supply values in a range of 0 to 255, you should use [method @GDScript.Color8]. [b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it's equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code]. + [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/color_constants.png]Color constants cheatsheet[/url] </description> <tutorials> + <link title="2D GD Paint Demo">https://godotengine.org/asset-library/asset/517</link> + <link title="Tween Demo">https://godotengine.org/asset-library/asset/146</link> + <link title="GUI Drag And Drop Demo">https://godotengine.org/asset-library/asset/133</link> </tutorials> <methods> <method name="Color"> @@ -19,21 +23,39 @@ </argument> <description> Constructs a color from an HTML hexadecimal color string in RGB or RGBA format. See also [method @GDScript.ColorN]. - [codeblock] + [codeblocks] + [gdscript] # Each of the following creates the same color RGBA(178, 217, 10, 255). var c3 = Color("#b2d90a") # RGB format with "#". var c4 = Color("b2d90a") # RGB format. var c1 = Color("#b2d90aff") # RGBA format with "#". var c2 = Color("b2d90aff") # RGBA format. - [/codeblock] + [/gdscript] + [csharp] + // Each of the following creates the same color RGBA(178, 217, 10, 255). + var c3 = new Color("#b2d90a"); + var c4 = new Color("b2d90a"); // RGB format. + var c1 = new Color("#b2d90aff"); + var c2 = new Color("b2d90aff"); // RGBA format. + [/csharp] + [/codeblocks] You can also use the "web color" short-hand form by only using 3 or 4 digits. - [codeblock] + [codeblocks] + [gdscript] # Each of the following creates the same color RGBA(17, 34, 51, 255). var c3 = Color("#123") # RGB format with "#". var c4 = Color("123") # RGB format. var c1 = Color("#123f") # RGBA format with "#". var c2 = Color("123f") # RGBA format. - [/codeblock] + [/gdscript] + [csharp] + // Each of the following creates the same color RGBA(17, 34, 51, 255). + var c3 = new Color("#123"); + var c4 = new Color("123"); // RGB format. + var c1 = new Color("#123f"); + var c2 = new Color("123f"); // RGBA format. + [/csharp] + [/codeblocks] </description> </method> <method name="Color"> @@ -43,9 +65,14 @@ </argument> <description> Constructs a color from a 32-bit integer (each byte represents a component of the RGBA profile). - [codeblock] + [codeblocks] + [gdscript] var c = Color(274) # Equivalent to RGBA(0, 0, 1, 18) - [/codeblock] + [/gdscript] + [csharp] + var c = new Color(274); // Equivalent to RGBA(0, 0, 1, 18) + [/csharp] + [/codeblocks] </description> </method> <method name="Color"> @@ -57,9 +84,14 @@ </argument> <description> Constructs a color from an existing color, but with a custom alpha value. - [codeblock] + [codeblocks] + [gdscript] var red = Color(Color.red, 0.5) # 50% transparent red. - [/codeblock] + [/gdscript] + [csharp] + var red = new Color(Colors.Red, 0.5f); // 50% transparent red. + [/csharp] + [/codeblocks] </description> </method> <method name="Color"> @@ -73,9 +105,14 @@ </argument> <description> Constructs a color from an RGB profile using values between 0 and 1. Alpha will always be 1. - [codeblock] - var c = Color(0.2, 1.0, 0.7) # Equivalent to RGBA(51, 255, 178, 255) - [/codeblock] + [codeblocks] + [gdscript] + var color = Color(0.2, 1.0, 0.7) # Equivalent to RGBA(51, 255, 178, 255) + [/gdscript] + [csharp] + var color = new Color(0.2f, 1.0f, 0.7f); // Equivalent to RGBA(51, 255, 178, 255) + [/csharp] + [/codeblocks] </description> </method> <method name="Color"> @@ -91,9 +128,14 @@ </argument> <description> Constructs a color from an RGBA profile using values between 0 and 1. - [codeblock] - var c = Color(0.2, 1.0, 0.7, 0.8) # Equivalent to RGBA(51, 255, 178, 204) - [/codeblock] + [codeblocks] + [gdscript] + var color = Color(0.2, 1.0, 0.7, 0.8) # Equivalent to RGBA(51, 255, 178, 204) + [/gdscript] + [csharp] + var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Equivalent to RGBA(51, 255, 178, 255, 204) + [/csharp] + [/codeblocks] </description> </method> <method name="blend"> @@ -103,11 +145,18 @@ </argument> <description> Returns a new color resulting from blending this color over another. If the color is opaque, the result is also opaque. The second color may have a range of alpha values. - [codeblock] + [codeblocks] + [gdscript] var bg = Color(0.0, 1.0, 0.0, 0.5) # Green with alpha of 50% var fg = Color(1.0, 0.0, 0.0, 0.5) # Red with alpha of 50% var blended_color = bg.blend(fg) # Brown with alpha of 75% - [/codeblock] + [/gdscript] + [csharp] + var bg = new Color(0.0f, 1.0f, 0.0f, 0.5f); // Green with alpha of 50% + var fg = new Color(1.0f, 0.0f, 0.0f, 0.5f); // Red with alpha of 50% + Color blendedColor = bg.Blend(fg); // Brown with alpha of 75% + [/csharp] + [/codeblocks] </description> </method> <method name="contrasted"> @@ -115,10 +164,16 @@ </return> <description> Returns the most contrasting color. - [codeblock] - var c = Color(0.3, 0.4, 0.9) - var contrasted_color = c.contrasted() # Equivalent to RGBA(204, 229, 102, 255) - [/codeblock] + [codeblocks] + [gdscript] + var color = Color(0.3, 0.4, 0.9) + var contrasted_color = color.contrasted() # Equivalent to RGBA(204, 229, 102, 255) + [/gdscript] + [csharp] + var color = new Color(0.3f, 0.4f, 0.9f); + Color contrastedColor = color.Contrasted(); // Equivalent to RGBA(204, 229, 102, 255) + [/csharp] + [/codeblocks] </description> </method> <method name="darkened"> @@ -128,10 +183,16 @@ </argument> <description> Returns a new color resulting from making this color darker by the specified percentage (ratio from 0 to 1). - [codeblock] + [codeblocks] + [gdscript] var green = Color(0.0, 1.0, 0.0) var darkgreen = green.darkened(0.2) # 20% darker than regular green - [/codeblock] + [/gdscript] + [csharp] + var green = new Color(0.0f, 1.0f, 0.0f); + Color darkgreen = green.Darkened(0.2f); // 20% darker than regular green + [/csharp] + [/codeblocks] </description> </method> <method name="from_hsv"> @@ -147,9 +208,14 @@ </argument> <description> Constructs a color from an HSV profile. [code]h[/code], [code]s[/code], and [code]v[/code] are values between 0 and 1. - [codeblock] - var c = Color.from_hsv(0.58, 0.5, 0.79, 0.8) # Equivalent to HSV(210, 50, 79, 0.8) or Color8(100, 151, 201, 0.8) - [/codeblock] + [codeblocks] + [gdscript] + var color = Color.from_hsv(0.58, 0.5, 0.79, 0.8) # Equivalent to HSV(210, 50, 79, 0.8) or Color8(100, 151, 201, 0.8) + [/gdscript] + [csharp] + Color color = Color.FromHsv(0.58f, 0.5f, 0.79f, 0.8f); // Equivalent to HSV(210, 50, 79, 0.8) or Color8(100, 151, 201, 0.8) + [/csharp] + [/codeblocks] </description> </method> <method name="inverted"> @@ -157,10 +223,16 @@ </return> <description> Returns the inverted color [code](1 - r, 1 - g, 1 - b, a)[/code]. - [codeblock] - var c = Color(0.3, 0.4, 0.9) - var inverted_color = c.inverted() # A color of an RGBA(178, 153, 26, 255) - [/codeblock] + [codeblocks] + [gdscript] + var color = Color(0.3, 0.4, 0.9) + var inverted_color = color.inverted() # A color of an RGBA(178, 153, 26, 255) + [/gdscript] + [csharp] + var color = new Color(0.3f, 0.4f, 0.9f); + Color invertedColor = color.Inverted(); // A color of an RGBA(178, 153, 26, 255) + [/csharp] + [/codeblocks] </description> </method> <method name="is_equal_approx"> @@ -181,11 +253,18 @@ </argument> <description> Returns the linear interpolation with another color. The interpolation factor [code]t[/code] is between 0 and 1. - [codeblock] + [codeblocks] + [gdscript] var c1 = Color(1.0, 0.0, 0.0) var c2 = Color(0.0, 1.0, 0.0) - var li_c = c1.lerp(c2, 0.5) # A color of an RGBA(128, 128, 0, 255) - [/codeblock] + var lerp_color = c1.lerp(c2, 0.5) # A color of an RGBA(128, 128, 0, 255) + [/gdscript] + [csharp] + var c1 = new Color(1.0f, 0.0f, 0.0f); + var c2 = new Color(0.0f, 1.0f, 0.0f); + Color lerpColor = c1.Lerp(c2, 0.5f); // A color of an RGBA(128, 128, 0, 255) + [/csharp] + [/codeblocks] </description> </method> <method name="lightened"> @@ -195,10 +274,16 @@ </argument> <description> Returns a new color resulting from making this color lighter by the specified percentage (ratio from 0 to 1). - [codeblock] + [codeblocks] + [gdscript] var green = Color(0.0, 1.0, 0.0) var lightgreen = green.lightened(0.2) # 20% lighter than regular green - [/codeblock] + [/gdscript] + [csharp] + var green = new Color(0.0f, 1.0f, 0.0f); + Color lightgreen = green.Lightened(0.2f); // 20% lighter than regular green + [/csharp] + [/codeblocks] </description> </method> <method name="to_abgr32"> @@ -206,10 +291,16 @@ </return> <description> Returns the color's 32-bit integer in ABGR format (each byte represents a component of the ABGR profile). ABGR is the reversed version of the default format. - [codeblock] - var c = Color(1, 0.5, 0.2) - print(c.to_abgr32()) # Prints 4281565439 - [/codeblock] + [codeblocks] + [gdscript] + var color = Color(1, 0.5, 0.2) + print(color.to_abgr32()) # Prints 4281565439 + [/gdscript] + [csharp] + var color = new Color(1.0f, 0.5f, 0.2f); + GD.Print(color.ToAbgr32()); // Prints 4281565439 + [/csharp] + [/codeblocks] </description> </method> <method name="to_abgr64"> @@ -217,10 +308,16 @@ </return> <description> Returns the color's 64-bit integer in ABGR format (each word represents a component of the ABGR profile). ABGR is the reversed version of the default format. - [codeblock] - var c = Color(1, 0.5, 0.2) - print(c.to_abgr64()) # Prints -225178692812801 - [/codeblock] + [codeblocks] + [gdscript] + var color = Color(1, 0.5, 0.2) + print(color.to_abgr64()) # Prints -225178692812801 + [/gdscript] + [csharp] + var color = new Color(1.0f, 0.5f, 0.2f); + GD.Print(color.ToAbgr64()); // Prints -225178692812801 + [/csharp] + [/codeblocks] </description> </method> <method name="to_argb32"> @@ -228,10 +325,16 @@ </return> <description> Returns the color's 32-bit integer in ARGB format (each byte represents a component of the ARGB profile). ARGB is more compatible with DirectX. - [codeblock] - var c = Color(1, 0.5, 0.2) - print(c.to_argb32()) # Prints 4294934323 - [/codeblock] + [codeblocks] + [gdscript] + var color = Color(1, 0.5, 0.2) + print(color.to_argb32()) # Prints 4294934323 + [/gdscript] + [csharp] + var color = new Color(1.0f, 0.5f, 0.2f); + GD.Print(color.ToArgb32()); // Prints 4294934323 + [/csharp] + [/codeblocks] </description> </method> <method name="to_argb64"> @@ -239,10 +342,16 @@ </return> <description> Returns the color's 64-bit integer in ARGB format (each word represents a component of the ARGB profile). ARGB is more compatible with DirectX. - [codeblock] - var c = Color(1, 0.5, 0.2) - print(c.to_argb64()) # Prints -2147470541 - [/codeblock] + [codeblocks] + [gdscript] + var color = Color(1, 0.5, 0.2) + print(color.to_argb64()) # Prints -2147470541 + [/gdscript] + [csharp] + var color = new Color(1.0f, 0.5f, 0.2f); + GD.Print(color.ToArgb64()); // Prints -2147470541 + [/csharp] + [/codeblocks] </description> </method> <method name="to_html"> @@ -253,11 +362,18 @@ <description> Returns the color's HTML hexadecimal color string in RGBA format (ex: [code]ff34f822[/code]). Setting [code]with_alpha[/code] to [code]false[/code] excludes alpha from the hexadecimal string (and uses RGB instead of RGBA format). - [codeblock] - var c = Color(1, 1, 1, 0.5) - var s1 = c.to_html() # Returns "ffffff7f" - var s2 = c.to_html(false) # Returns "ffffff" - [/codeblock] + [codeblocks] + [gdscript] + var color = Color(1, 1, 1, 0.5) + var with_alpha = color.to_html() # Returns "ffffff7f" + var without_alpha = color.to_html(false) # Returns "ffffff" + [/gdscript] + [csharp] + var color = new Color(1, 1, 1, 0.5f); + String withAlpha = color.ToHtml(); // Returns "ffffff7f" + String withoutAlpha = color.ToHtml(false); // Returns "ffffff" + [/csharp] + [/codeblocks] </description> </method> <method name="to_rgba32"> @@ -265,10 +381,16 @@ </return> <description> Returns the color's 32-bit integer in RGBA format (each byte represents a component of the RGBA profile). RGBA is Godot's default format. - [codeblock] - var c = Color(1, 0.5, 0.2) - print(c.to_rgba32()) # Prints 4286526463 - [/codeblock] + [codeblocks] + [gdscript] + var color = Color(1, 0.5, 0.2) + print(color.to_rgba32()) # Prints 4286526463 + [/gdscript] + [csharp] + var color = new Color(1, 0.5f, 0.2f); + GD.Print(color.ToRgba32()); // Prints 4286526463 + [/csharp] + [/codeblocks] </description> </method> <method name="to_rgba64"> @@ -276,10 +398,16 @@ </return> <description> Returns the color's 64-bit integer in RGBA format (each word represents a component of the RGBA profile). RGBA is Godot's default format. - [codeblock] - var c = Color(1, 0.5, 0.2) - print(c.to_rgba64()) # Prints -140736629309441 - [/codeblock] + [codeblocks] + [gdscript] + var color = Color(1, 0.5, 0.2) + print(color.to_rgba64()) # Prints -140736629309441 + [/gdscript] + [csharp] + var color = new Color(1, 0.5f, 0.2f); + GD.Print(color.ToRgba64()); // Prints -140736629309441 + [/csharp] + [/codeblocks] </description> </method> </methods> diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index d8b4a8f76c..aea3542867 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -7,6 +7,7 @@ Displays a color picker widget. Useful for selecting a color from an RGB/RGBA colorspace. </description> <tutorials> + <link title="Tween Demo">https://godotengine.org/asset-library/asset/146</link> </tutorials> <methods> <method name="add_preset"> diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index 67f64c8a66..76cc49a043 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -5,8 +5,11 @@ </brief_description> <description> Encapsulates a [ColorPicker] making it accessible by pressing a button. Pressing the button will toggle the [ColorPicker] visibility. + See also [BaseButton] which contains common properties and methods associated with this node. </description> <tutorials> + <link title="GUI Drag And Drop Demo">https://godotengine.org/asset-library/asset/133</link> + <link title="2D GD Paint Demo">https://godotengine.org/asset-library/asset/517</link> </tutorials> <methods> <method name="get_picker"> diff --git a/doc/classes/ColorRect.xml b/doc/classes/ColorRect.xml index 92f42b6dd3..072759e383 100644 --- a/doc/classes/ColorRect.xml +++ b/doc/classes/ColorRect.xml @@ -7,15 +7,21 @@ Displays a colored rectangle. </description> <tutorials> + <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> </tutorials> <methods> </methods> <members> <member name="color" type="Color" setter="set_frame_color" getter="get_frame_color" default="Color( 1, 1, 1, 1 )"> The fill color. - [codeblock] + [codeblocks] + [gdscript] $ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect's color to red. - [/codeblock] + [/gdscript] + [csharp] + GetNode<ColorRect>("ColorRect").Color = new Color(1, 0, 0, 1); // Set ColorRect's color to red. + [/csharp] + [/codeblocks] </member> </members> <constants> diff --git a/doc/classes/ConcavePolygonShape3D.xml b/doc/classes/ConcavePolygonShape3D.xml index 20402d350a..3e83202472 100644 --- a/doc/classes/ConcavePolygonShape3D.xml +++ b/doc/classes/ConcavePolygonShape3D.xml @@ -8,6 +8,7 @@ Note: when used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [KinematicBody3D] or [RigidBody3D] with a mode other than Static. </description> <tutorials> + <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> </tutorials> <methods> <method name="get_faces" qualifiers="const"> diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index 522d484131..da17d993e3 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -13,7 +13,8 @@ [/codeblock] The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly without accessing the filesystem. The following example shows how to parse an INI-style file from the system, read its contents and store new values in it: - [codeblock] + [codeblocks] + [gdscript] var config = ConfigFile.new() var err = config.load("user://settings.cfg") if err == OK: # If not, something went wrong with the file loading @@ -24,7 +25,24 @@ config.set_value("audio", "mute", false) # Save the changes by overwriting the previous file config.save("user://settings.cfg") - [/codeblock] + [/gdscript] + [csharp] + var config = new ConfigFile(); + Error err = config.Load("user://settings.cfg"); + if (err == Error.Ok) // If not, something went wrong with the file loading + { + // Look for the display/width pair, and default to 1024 if missing + int screenWidth = (int)config.GetValue("display", "width", 1024); + // Store a variable if and only if it hasn't been defined yet + if (!config.HasSectionKey("audio", "mute")) + { + config.SetValue("audio", "mute", false); + } + // Save the changes by overwriting the previous file + config.Save("user://settings.cfg"); + } + [/csharp] + [/codeblocks] Keep in mind that section and property names can't contain spaces. Anything after a space will be ignored on save and on load. ConfigFiles can also contain manually written comment lines starting with a semicolon ([code];[/code]). Those lines will be ignored when parsing the file. Note that comments will be lost when saving the ConfigFile. This can still be useful for dedicated server configuration files, which are typically never overwritten without explicit user action. </description> diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml index 6d5871508b..a850afdd9f 100644 --- a/doc/classes/ConfirmationDialog.xml +++ b/doc/classes/ConfirmationDialog.xml @@ -6,9 +6,14 @@ <description> Dialog for confirmation of actions. This dialog inherits from [AcceptDialog], but has by default an OK and Cancel button (in host OS order). To get cancel action, you can use: - [codeblock] + [codeblocks] + [gdscript] get_cancel().connect("pressed", self, "cancelled") - [/codeblock]. + [/gdscript] + [csharp] + GetCancel().Connect("pressed", this, nameof(Cancelled)); + [/csharp] + [/codeblocks] </description> <tutorials> </tutorials> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index c8e37d7d7b..f495bfe894 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -18,6 +18,7 @@ <tutorials> <link title="GUI tutorial index">https://docs.godotengine.org/en/latest/tutorials/gui/index.html</link> <link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link> + <link title="All GUI Demos">https://github.com/godotengine/godot-demo-projects/tree/master/gui</link> </tutorials> <methods> <method name="_clips_input" qualifiers="virtual"> @@ -44,12 +45,27 @@ <description> Virtual method to be implemented by the user. Use this method to process and accept inputs on UI elements. See [method accept_event]. Example: clicking a control. - [codeblock] + [codeblocks] + [gdscript] func _gui_input(event): if event is InputEventMouseButton: if event.button_index == BUTTON_LEFT and event.pressed: print("I've been clicked D:") - [/codeblock] + [/gdscript] + [csharp] + public override void _GuiInput(InputEvent @event) + { + if (@event is InputEventMouseButton) + { + var mb = @event as InputEventMouseButton; + if (mb.ButtonIndex == (int)ButtonList.Left && mb.Pressed) + { + GD.Print("I've been clicked D:"); + } + } + } + [/csharp] + [/codeblocks] The event won't trigger if: * clicking outside the control (see [method has_point]); * control has [member mouse_filter] set to [constant MOUSE_FILTER_IGNORE]; @@ -68,19 +84,39 @@ The returned node must be of type [Control] or Control-derieved. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance, not e.g. a node from scene. When [code]null[/code] or non-Control node is returned, the default tooltip will be used instead. [b]Note:[/b] The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its [member rect_min_size] to some non-zero value. Example of usage with custom-constructed node: - [codeblock] + [codeblocks] + [gdscript] func _make_custom_tooltip(for_text): var label = Label.new() label.text = for_text return label - [/codeblock] + [/gdscript] + [csharp] + public override Godot.Object _MakeCustomTooltip(String forText) + { + var label = new Label(); + label.Text = forText; + return label; + } + [/csharp] + [/codeblocks] Example of usage with custom scene instance: - [codeblock] + [codeblocks] + [gdscript] func _make_custom_tooltip(for_text): var tooltip = preload("SomeTooltipScene.tscn").instance() tooltip.get_node("Label").text = for_text return tooltip - [/codeblock] + [/gdscript] + [csharp] + public override Godot.Object _MakeCustomTooltip(String forText) + { + Node tooltip = ResourceLoader.Load<PackedScene>("SomeTooltipScene.tscn").Instance(); + tooltip.GetNode<Label>("Label").Text = forText; + return tooltip; + } + [/csharp] + [/codeblocks] </description> </method> <method name="accept_event"> @@ -101,14 +137,22 @@ Overrides the [Color] with given [code]name[/code] in the [member theme] resource the control uses. [b]Note:[/b] Unlike other theme overrides, there is no way to undo a color override without manually assigning the previous color. [b]Example of overriding a label's color and resetting it later:[/b] - [codeblock] + [codeblocks] + [gdscript] # Override the child node "MyLabel"'s font color to orange. $MyLabel.add_theme_color_override("font_color", Color(1, 0.5, 0)) - # Reset the color by creating a new node to get the default value: var default_label_color = Label.new().get_theme_color("font_color") $MyLabel.add_theme_color_override("font_color", default_label_color) - [/codeblock] + [/gdscript] + [csharp] + // Override the child node "MyLabel"'s font color to orange. + GetNode<Label>("MyLabel").AddThemeColorOverride("font_color", new Color(1, 0.5f, 0)); + // Reset the color by creating a new node to get the default value: + var defaultLabelColor = new Label().GetThemeColor("font_color"); + GetNode<Label>("MyLabel").AddThemeColorOverride("font_color", defaultLabelColor); + [/csharp] + [/codeblocks] </description> </method> <method name="add_theme_constant_override"> @@ -165,7 +209,8 @@ <description> Overrides the [StyleBox] with given [code]name[/code] in the [member theme] resource the control uses. If [code]stylebox[/code] is empty or invalid, the override is cleared and the [StyleBox] from assigned [Theme] is used. [b]Example of modifying a property in a StyleBox by duplicating it:[/b] - [codeblock] + [codeblocks] + [gdscript] # The snippet below assumes the child node MyButton has a StyleBoxFlat assigned. # Resources are shared across instances, so we need to duplicate it # to avoid modifying the appearance of all other buttons. @@ -173,10 +218,21 @@ new_stylebox_normal.border_width_top = 3 new_stylebox_normal.border_color = Color(0, 1, 0.5) $MyButton.add_theme_stylebox_override("normal", new_stylebox_normal) - # Remove the stylebox override: $MyButton.add_theme_stylebox_override("normal", null) - [/codeblock] + [/gdscript] + [csharp] + // The snippet below assumes the child node MyButton has a StyleBoxFlat assigned. + // Resources are shared across instances, so we need to duplicate it + // to avoid modifying the appearance of all other buttons. + StyleBoxFlat newStyleboxNormal = GetNode<Button>("MyButton").GetThemeStylebox("normal").Duplicate() as StyleBoxFlat; + newStyleboxNormal.BorderWidthTop = 3; + newStyleboxNormal.BorderColor = new Color(0, 1, 0.5f); + GetNode<Button>("MyButton").AddThemeStyleboxOverride("normal", newStyleboxNormal); + // Remove the stylebox override: + GetNode<Button>("MyButton").AddThemeStyleboxOverride("normal", null); + [/csharp] + [/codeblocks] </description> </method> <method name="can_drop_data" qualifiers="virtual"> @@ -189,12 +245,22 @@ <description> Godot calls this method to test if [code]data[/code] from a control's [method get_drag_data] can be dropped at [code]position[/code]. [code]position[/code] is local to this control. This method should only be used to test the data. Process the data in [method drop_data]. - [codeblock] + [codeblocks] + [gdscript] func can_drop_data(position, data): # Check position if it is relevant to you # Otherwise, just check data return typeof(data) == TYPE_DICTIONARY and data.has("expected") - [/codeblock] + [/gdscript] + [csharp] + public override bool CanDropData(Vector2 position, object data) + { + // Check position if it is relevant to you + // Otherwise, just check data + return data is Godot.Collections.Dictionary && (data as Godot.Collections.Dictionary).Contains("expected"); + } + [/csharp] + [/codeblocks] </description> </method> <method name="drop_data" qualifiers="virtual"> @@ -206,13 +272,24 @@ </argument> <description> Godot calls this method to pass you the [code]data[/code] from a control's [method get_drag_data] result. Godot first calls [method can_drop_data] to test if [code]data[/code] is allowed to drop at [code]position[/code] where [code]position[/code] is local to this control. - [codeblock] + [codeblocks] + [gdscript] func can_drop_data(position, data): return typeof(data) == TYPE_DICTIONARY and data.has("color") - func drop_data(position, data): - color = data["color"] - [/codeblock] + var color = data["color"] + [/gdscript] + [csharp] + public override bool CanDropData(Vector2 position, object data) + { + return data is Godot.Collections.Dictionary && (data as Godot.Collections.Dictionary).Contains("color"); + } + public override void DropData(Vector2 position, object data) + { + Color color = (Color)(data as Godot.Collections.Dictionary)["color"]; + } + [/csharp] + [/codeblocks] </description> </method> <method name="force_drag"> @@ -267,12 +344,22 @@ <description> Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns [code]null[/code] if there is no data to drag. Controls that want to receive drop data should implement [method can_drop_data] and [method drop_data]. [code]position[/code] is local to this control. Drag may be forced with [method force_drag]. A preview that will follow the mouse that should represent the data can be set with [method set_drag_preview]. A good time to set the preview is in this method. - [codeblock] + [codeblocks] + [gdscript] func get_drag_data(position): - var mydata = make_data() - set_drag_preview(make_preview(mydata)) + var mydata = make_data() # This is your custom method generating the drag data. + set_drag_preview(make_preview(mydata)) # This is your custom method generating the preview of the drag data. return mydata - [/codeblock] + [/gdscript] + [csharp] + public override object GetDragData(Vector2 position) + { + object mydata = MakeData(); // This is your custom method generating the drag data. + SetDragPreview(MakePreview(mydata)); // This is your custom method generating the preview of the drag data. + return mydata; + } + [/csharp] + [/codeblocks] </description> </method> <method name="get_end" qualifiers="const"> @@ -358,10 +445,18 @@ </argument> <description> Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. - [codeblock] + [codeblocks] + [gdscript] func _ready(): modulate = get_theme_color("font_color", "Button") #get the color defined for button fonts - [/codeblock] + [/gdscript] + [csharp] + public override void _Ready() + { + Modulate = GetThemeColor("font_color", "Button"); //get the color defined for button fonts + } + [/csharp] + [/codeblocks] </description> </method> <method name="get_theme_constant" qualifiers="const"> @@ -422,10 +517,18 @@ </return> <description> Creates an [InputEventMouseButton] that attempts to click the control. If the event is received, the control acquires focus. - [codeblock] + [codeblocks] + [gdscript] func _process(delta): grab_click_focus() #when clicking another Control node, this node will be clicked instead - [/codeblock] + [/gdscript] + [csharp] + public override void _Process(float delta) + { + GrabClickFocus(); //when clicking another Control node, this node will be clicked instead + } + [/csharp] + [/codeblocks] </description> </method> <method name="grab_focus"> @@ -566,7 +669,7 @@ <return type="void"> </return> <description> - Invalidates the size cache in this node and in parent nodes up to toplevel. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member rect_min_size] directly calls this method automatically. + Invalidates the size cache in this node and in parent nodes up to top_level. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member rect_min_size] directly calls this method automatically. </description> </method> <method name="release_focus"> @@ -652,24 +755,61 @@ Forwarding can be implemented in the target control similar to the methods [method get_drag_data], [method can_drop_data], and [method drop_data] but with two differences: 1. The function name must be suffixed with [b]_fw[/b] 2. The function must take an extra argument that is the control doing the forwarding - [codeblock] + [codeblocks] + [gdscript] # ThisControl.gd extends Control + export(Control) var target_control + func _ready(): set_drag_forwarding(target_control) # TargetControl.gd extends Control + func can_drop_data_fw(position, data, from_control): return true func drop_data_fw(position, data, from_control): - my_handle_data(data) + my_handle_data(data) # Your handler method. func get_drag_data_fw(position, from_control): set_drag_preview(my_preview) return my_data() - [/codeblock] + [/gdscript] + [csharp] + // ThisControl.cs + public class ThisControl : Control + { + [Export] + public Control TargetControl { get; set; } + public override void _Ready() + { + SetDragForwarding(TargetControl); + } + } + + // TargetControl.cs + public class TargetControl : Control + { + public void CanDropDataFw(Vector2 position, object data, Control fromControl) + { + return true; + } + + public void DropDataFw(Vector2 position, object data, Control fromControl) + { + MyHandleData(data); // Your handler method. + } + + public void GetDragDataFw(Vector2 position, Control fromControl) + { + SetDragPreview(MyPreview); + return MyData(); + } + } + [/csharp] + [/codeblocks] </description> </method> <method name="set_drag_preview"> @@ -679,7 +819,8 @@ </argument> <description> Shows the given control at the mouse pointer. A good time to call this method is in [method get_drag_data]. The control must not be in the scene tree. - [codeblock] + [codeblocks] + [gdscript] export (Color, RGBA) var color = Color(1, 0, 0, 1) func get_drag_data(position): @@ -689,7 +830,22 @@ cpb.rect_size = Vector2(50, 50) set_drag_preview(cpb) return color - [/codeblock] + [/gdscript] + [csharp] + [Export] + public Color Color = new Color(1, 0, 0, 1); + + public override object GetDragData(Vector2 position) + { + // Use a control that is not in the tree + var cpb = new ColorPickerButton(); + cpb.Color = Color; + cpb.RectSize = new Vector2(50, 50); + SetDragPreview(cpb); + return Color; + } + [/csharp] + [/codeblocks] </description> </method> <method name="set_end"> diff --git a/doc/classes/ConvexPolygonShape3D.xml b/doc/classes/ConvexPolygonShape3D.xml index c036f80e2d..e18d716255 100644 --- a/doc/classes/ConvexPolygonShape3D.xml +++ b/doc/classes/ConvexPolygonShape3D.xml @@ -7,6 +7,7 @@ Convex polygon shape resource, which can be added to a [PhysicsBody3D] or area. </description> <tutorials> + <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> </tutorials> <methods> </methods> diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml index 4edb3eda0a..b3bbbae94f 100644 --- a/doc/classes/Crypto.xml +++ b/doc/classes/Crypto.xml @@ -6,13 +6,12 @@ <description> The Crypto class allows you to access some more advanced cryptographic functionalities in Godot. For now, this includes generating cryptographically secure random bytes, RSA keys and self-signed X509 certificates generation, asymmetric key encryption/decryption, and signing/verification. - [codeblock] + [codeblocks] + [gdscript] extends Node - var crypto = Crypto.new() var key = CryptoKey.new() var cert = X509Certificate.new() - func _ready(): # Generate new RSA key. key = crypto.generate_rsa(4096) @@ -33,7 +32,42 @@ # Checks assert(verified) assert(data.to_utf8() == decrypted) - [/codeblock] + [/gdscript] + [csharp] + using Godot; + using System; + using System.Diagnostics; + + public class CryptoNode : Node + { + public Crypto Crypto = new Crypto(); + public CryptoKey Key = new CryptoKey(); + public X509Certificate Cert = new X509Certificate(); + public override void _Ready() + { + // Generate new RSA key. + Key = Crypto.GenerateRsa(4096); + // Generate new self-signed certificate with the given key. + Cert = Crypto.GenerateSelfSignedCertificate(Key, "CN=mydomain.com,O=My Game Company,C=IT"); + // Save key and certificate in the user folder. + Key.Save("user://generated.key"); + Cert.Save("user://generated.crt"); + // Encryption + string data = "Some data"; + byte[] encrypted = Crypto.Encrypt(Key, data.ToUTF8()); + // Decryption + byte[] decrypted = Crypto.Decrypt(Key, encrypted); + // Signing + byte[] signature = Crypto.Sign(HashingContext.HashType.Sha256, Data.SHA256Buffer(), Key); + // Verifying + bool verified = Crypto.Verify(HashingContext.HashType.Sha256, Data.SHA256Buffer(), signature, Key); + // Checks + Debug.Assert(verified); + Debug.Assert(data.ToUTF8() == decrypted); + } + } + [/csharp] + [/codeblocks] [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> @@ -95,13 +129,22 @@ <description> Generates a self-signed [X509Certificate] from the given [CryptoKey] and [code]issuer_name[/code]. The certificate validity will be defined by [code]not_before[/code] and [code]not_after[/code] (first valid date and last valid date). The [code]issuer_name[/code] must contain at least "CN=" (common name, i.e. the domain name), "O=" (organization, i.e. your company name), "C=" (country, i.e. 2 lettered ISO-3166 code of the country the organization is based in). A small example to generate an RSA key and a X509 self-signed certificate. - [codeblock] + [codeblocks] + [gdscript] var crypto = Crypto.new() # Generate 4096 bits RSA key. var key = crypto.generate_rsa(4096) # Generate self-signed certificate using the given key. var cert = crypto.generate_self_signed_certificate(key, "CN=example.com,O=A Game Company,C=IT") - [/codeblock] + [/gdscript] + [csharp] + var crypto = new Crypto(); + // Generate 4096 bits RSA key. + CryptoKey key = crypto.GenerateRsa(4096); + // Generate self-signed certificate using the given key. + X509Certificate cert = crypto.GenerateSelfSignedCertificate(key, "CN=mydomain.com,O=My Game Company,C=IT"); + [/csharp] + [/codeblocks] </description> </method> <method name="sign"> diff --git a/doc/classes/CylinderShape3D.xml b/doc/classes/CylinderShape3D.xml index eb12568e71..99334ceae6 100644 --- a/doc/classes/CylinderShape3D.xml +++ b/doc/classes/CylinderShape3D.xml @@ -7,6 +7,9 @@ Cylinder shape for collisions. </description> <tutorials> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> + <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <methods> </methods> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 7123deb206..cb60d6e621 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -74,6 +74,8 @@ </description> <tutorials> <link title="GDScript basics: Dictionary">https://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_basics.html#dictionary</link> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> + <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> </tutorials> <methods> <method name="clear"> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 814c232668..53776b7752 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -521,6 +521,18 @@ <argument index="0" name="screen" type="int" default="-1"> </argument> <description> + Returns the dots per inch density of the specified screen. If [code]screen[/code] is [/code]SCREEN_OF_MAIN_WINDOW[/code] (the default value), a screen with the main window will be used. + [b]Note:[/b] On macOS, returned value is inaccurate if fractional display scaling mode is used. + [b]Note:[/b] On Android devices, the actual screen densities are grouped into six generalized densities: + [codeblock] + ldpi - 120 dpi + mdpi - 160 dpi + hdpi - 240 dpi + xhdpi - 320 dpi + xxhdpi - 480 dpi + xxxhdpi - 640 dpi + [/codeblock] + [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. Returns [code]72[/code] on unsupported platforms. </description> </method> <method name="screen_get_max_scale" qualifiers="const"> @@ -901,6 +913,30 @@ <description> </description> </method> + <method name="window_set_mouse_passthrough"> + <return type="void"> + </return> + <argument index="0" name="region" type="PackedVector2Array"> + </argument> + <argument index="1" name="window_id" type="int" default="0"> + </argument> + <description> + Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through. + Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior). + [codeblock] + # Set region, using Path2D node. + DisplayServer.window_set_mouse_passthrough($Path2D.curve.get_baked_points()) + + # Set region, using Polygon2D node. + DisplayServer.window_set_mouse_passthrough($Polygon2D.polygon) + + # Reset region to default. + DisplayServer.window_set_mouse_passthrough([]) + [/codeblock] + [b]Note:[/b] On Windows, the portion of a window that lies outside the region is not drawn, while on Linux and macOS it is. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + </description> + </method> <method name="window_set_position"> <return type="void"> </return> diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml index b0635892be..f687937e27 100644 --- a/doc/classes/DynamicFont.xml +++ b/doc/classes/DynamicFont.xml @@ -15,6 +15,7 @@ [b]Note:[/b] DynamicFont doesn't support features such as kerning, right-to-left typesetting, ligatures, text shaping, variable fonts and optional font features yet. If you wish to "bake" an optional font feature into a TTF font file, you can use [url=https://fontforge.org/]FontForge[/url] to do so. In FontForge, use [b]File > Generate Fonts[/b], click [b]Options[/b], choose the desired features then generate the font. </description> <tutorials> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <methods> <method name="add_fallback"> @@ -96,10 +97,12 @@ Extra spacing at the bottom in pixels. </member> <member name="extra_spacing_char" type="int" setter="set_spacing" getter="get_spacing" default="0"> - Extra character spacing in pixels. + Extra spacing for each character in pixels. + This can be a negative number to make the distance between characters smaller. </member> <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing" default="0"> - Extra space spacing in pixels. + Extra spacing for the space character (in addition to [member extra_spacing_char]) in pixels. + This can be a negative number to make the distance between words smaller. </member> <member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0"> Extra spacing at the top in pixels. @@ -126,10 +129,10 @@ Spacing at the bottom. </constant> <constant name="SPACING_CHAR" value="2" enum="SpacingType"> - Character spacing. + Spacing for each character. </constant> <constant name="SPACING_SPACE" value="3" enum="SpacingType"> - Space spacing. + Spacing for the space character. </constant> </constants> </class> diff --git a/doc/classes/DynamicFontData.xml b/doc/classes/DynamicFontData.xml index 483da96f3f..45585f17e0 100644 --- a/doc/classes/DynamicFontData.xml +++ b/doc/classes/DynamicFontData.xml @@ -7,6 +7,7 @@ Used with [DynamicFont] to describe the location of a vector font file for dynamic rendering at runtime. </description> <tutorials> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <methods> </methods> diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index b290557336..2a7f27ef55 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -5,7 +5,7 @@ </brief_description> <description> EditorImportPlugins provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. Register your [EditorPlugin] with [method EditorPlugin.add_import_plugin]. - EditorImportPlugins work by associating with specific file extensions and a resource type. See [method get_recognized_extensions] and [method get_resource_type]. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].import[/code] directory. + EditorImportPlugins work by associating with specific file extensions and a resource type. See [method get_recognized_extensions] and [method get_resource_type]. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].godot/imported[/code] directory. Below is an example EditorImportPlugin that imports a [Mesh] from a file with the extension ".special" or ".spec": [codeblock] tool @@ -136,7 +136,7 @@ <return type="String"> </return> <description> - Gets the extension used to save this resource in the [code].import[/code] directory. + Gets the extension used to save this resource in the [code].godot/imported[/code] directory. </description> </method> <method name="get_visible_name" qualifiers="virtual"> diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index 9da36b51f9..c7561449b9 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -125,8 +125,10 @@ </argument> <argument index="1" name="for_property" type="String" default=""""> </argument> + <argument index="2" name="inspector_only" type="bool" default="false"> + </argument> <description> - Shows the given property on the given [code]object[/code] in the editor's Inspector dock. + Shows the given property on the given [code]object[/code] in the editor's Inspector dock. If [code]inspector_only[/code] is [code]true[/code], plugins will not attempt to edit [code]object[/code]. </description> </method> <method name="is_playing_scene" qualifiers="const"> diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml index 8865939eb1..4dea1bb645 100644 --- a/doc/classes/EditorNode3DGizmoPlugin.xml +++ b/doc/classes/EditorNode3DGizmoPlugin.xml @@ -136,7 +136,7 @@ </description> </method> <method name="get_priority" qualifiers="virtual"> - <return type="String"> + <return type="int"> </return> <description> Override this method to set the gizmo's priority. Higher values correspond to higher priority. If a gizmo with higher priority conflicts with another gizmo, only the gizmo with higher priority will be used. diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index caee6a0c07..8afc18f91b 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -13,6 +13,9 @@ <tutorials> <link title="Environment and post-processing">https://docs.godotengine.org/en/latest/tutorials/3d/environment_and_post_processing.html</link> <link title="Light transport in game engines">https://docs.godotengine.org/en/latest/tutorials/3d/high_dynamic_range.html</link> + <link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link> + <link title="2D HDR Demo">https://godotengine.org/asset-library/asset/110</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="is_glow_level_enabled" qualifiers="const"> diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 1982406993..ada57a8114 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -21,9 +21,11 @@ return content [/codeblock] In the example above, the file will be saved in the user data folder as specified in the [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]Data paths[/url] documentation. + [b]Note:[/b] To access project resources once exported, it is recommended to use [ResourceLoader] instead of the [File] API, as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package. </description> <tutorials> <link title="File system">https://docs.godotengine.org/en/latest/getting_started/step_by_step/filesystem.html</link> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <methods> <method name="close"> @@ -48,7 +50,7 @@ </argument> <description> Returns [code]true[/code] if the file exists in the given path. - [b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and that their source asset will not be included in the exported game, as only the imported version is used (in the [code]res://.import[/code] folder). To check for the existence of such resources while taking into account the remapping to their imported location, use [method ResourceLoader.exists]. Typically, using [code]File.file_exists[/code] on an imported resource would work while you are developing in the editor (the source asset is present in [code]res://[/code], but fail when exported). + [b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See [method ResourceLoader.exists] for an alternative approach that takes resource remapping into account. </description> </method> <method name="get_16" qualifiers="const"> @@ -398,8 +400,7 @@ <argument index="0" name="line" type="String"> </argument> <description> - Stores the given [String] as a line in the file. - Text will be encoded as UTF-8. + Appends [code]line[/code] to the file followed by a line return character ([code]\n[/code]), encoding the text as UTF-8. </description> </method> <method name="store_pascal_string"> @@ -427,8 +428,7 @@ <argument index="0" name="string" type="String"> </argument> <description> - Stores the given [String] in the file. - Text will be encoded as UTF-8. + Appends [code]string[/code] to the file without a line return, encoding the text as UTF-8. </description> </method> <method name="store_var"> diff --git a/doc/classes/FuncRef.xml b/doc/classes/FuncRef.xml index bf0c0b0d34..7c01397c24 100644 --- a/doc/classes/FuncRef.xml +++ b/doc/classes/FuncRef.xml @@ -14,7 +14,7 @@ <return type="Variant"> </return> <description> - Calls the referenced function previously set by [method set_function] or [method @GDScript.funcref]. + Calls the referenced function previously set in [member function] or [method @GDScript.funcref]. </description> </method> <method name="call_funcv"> @@ -23,35 +23,31 @@ <argument index="0" name="arg_array" type="Array"> </argument> <description> - Calls the referenced function previously set by [method set_function] or [method @GDScript.funcref]. Contrarily to [method call_func], this method does not support a variable number of arguments but expects all parameters to be passed via a single [Array]. + Calls the referenced function previously set in [member function] or [method @GDScript.funcref]. Contrarily to [method call_func], this method does not support a variable number of arguments but expects all parameters to be passed via a single [Array]. </description> </method> - <method name="is_valid" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns whether the object still exists and has the function assigned. - </description> - </method> - <method name="set_function"> + <method name="set_instance"> <return type="void"> </return> - <argument index="0" name="name" type="StringName"> + <argument index="0" name="instance" type="Object"> </argument> <description> - The name of the referenced function to call on the object, without parentheses or any parameters. + The object containing the referenced function. This object must be of a type actually inheriting from [Object], not a built-in type such as [int], [Vector2] or [Dictionary]. </description> </method> - <method name="set_instance"> - <return type="void"> + <method name="is_valid" qualifiers="const"> + <return type="bool"> </return> - <argument index="0" name="instance" type="Object"> - </argument> <description> - The object containing the referenced function. This object must be of a type actually inheriting from [Object], not a built-in type such as [int], [Vector2] or [Dictionary]. + Returns whether the object still exists and has the function assigned. </description> </method> </methods> + <members> + <member name="function" type="StringName" setter="set_function" getter="get_function"> + The name of the referenced function. + </member> + </members> <constants> </constants> </class> diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml index 9199468ab3..52d3698201 100644 --- a/doc/classes/GIProbe.xml +++ b/doc/classes/GIProbe.xml @@ -9,6 +9,7 @@ </description> <tutorials> <link title="GI probes">https://docs.godotengine.org/en/latest/tutorials/3d/gi_probes.html</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="bake"> diff --git a/doc/classes/GIProbeData.xml b/doc/classes/GIProbeData.xml index 228e1afb4c..693df8f819 100644 --- a/doc/classes/GIProbeData.xml +++ b/doc/classes/GIProbeData.xml @@ -5,6 +5,7 @@ <description> </description> <tutorials> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="allocate"> diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml index 244bdcf2f3..ba201af5db 100644 --- a/doc/classes/GPUParticles2D.xml +++ b/doc/classes/GPUParticles2D.xml @@ -9,6 +9,7 @@ </description> <tutorials> <link title="Particle systems (2D)">https://docs.godotengine.org/en/latest/tutorials/2d/particle_systems_2d.html</link> + <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> </tutorials> <methods> <method name="capture_rect" qualifiers="const"> diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml index 8444610f49..e840e457bf 100644 --- a/doc/classes/GPUParticles3D.xml +++ b/doc/classes/GPUParticles3D.xml @@ -9,6 +9,7 @@ </description> <tutorials> <link title="Controlling thousands of fish with Particles">https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/controlling_thousands_of_fish.html</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="capture_aabb" qualifiers="const"> diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml index 6ee794c5c4..ca6b4e69c3 100644 --- a/doc/classes/GridContainer.xml +++ b/doc/classes/GridContainer.xml @@ -9,6 +9,7 @@ [b]Note:[/b] GridContainer only works with child nodes inheriting from Control. It won't rearrange child nodes inheriting from Node2D. </description> <tutorials> + <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> </tutorials> <methods> </methods> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index dc88c53810..8cc7ecfbe3 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -146,7 +146,7 @@ <members> <member name="accept_gzip" type="bool" setter="set_accept_gzip" getter="is_accepting_gzip" default="true"> If [code]true[/code], this header will be added to each request: [code]Accept-Encoding: gzip, deflate[/code] telling servers that it's okay to compress response bodies. - Any Reponse body declaring a [code]Content-Encoding[/code] of either [code]gzip[/code] or [code]deflate[/code] will then be automatically decompressed, and the uncompressed bytes will be delivered via [code]request_completed[/code]. + Any Response body declaring a [code]Content-Encoding[/code] of either [code]gzip[/code] or [code]deflate[/code] will then be automatically decompressed, and the uncompressed bytes will be delivered via [code]request_completed[/code]. If the user has specified their own [code]Accept-Encoding[/code] header, then no header will be added regaurdless of [code]accept_gzip[/code]. If [code]false[/code] no header will be added, and no decompression will be performed on response bodies. The raw bytes of the response body will be returned via [code]request_completed[/code]. </member> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index b05ab5b4d6..fb0ed8ff62 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -8,6 +8,8 @@ </description> <tutorials> <link title="Inputs tutorial index">https://docs.godotengine.org/en/latest/tutorials/inputs/index.html</link> + <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <methods> <method name="action_press"> diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml index 3663ee98cc..8c6063bd67 100644 --- a/doc/classes/InputEvent.xml +++ b/doc/classes/InputEvent.xml @@ -9,6 +9,8 @@ <tutorials> <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> + <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <methods> <method name="accumulate"> diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml index e0d3e47219..1fe85a5ae8 100644 --- a/doc/classes/InputEventAction.xml +++ b/doc/classes/InputEventAction.xml @@ -8,6 +8,8 @@ </description> <tutorials> <link title="InputEvent: Actions">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#actions</link> + <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <methods> </methods> diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml index 3e64fd63ab..0f9e71adb4 100644 --- a/doc/classes/InputEventMouseMotion.xml +++ b/doc/classes/InputEventMouseMotion.xml @@ -9,6 +9,7 @@ </description> <tutorials> <link title="Mouse and input coordinates">https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <methods> </methods> diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml index d2cb558385..c707a72ee8 100644 --- a/doc/classes/JavaScript.xml +++ b/doc/classes/JavaScript.xml @@ -5,6 +5,7 @@ </brief_description> <description> The JavaScript singleton is implemented only in the HTML5 export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs. + [b]Note:[/b] This singleton can be disabled at build-time to improve security. By default, the JavaScript singleton is enabled. Official export templates also have the JavaScript singleton enabled. See [url=https://docs.godotengine.org/en/latest/development/compiling/compiling_for_web.html]Compiling for the Web[/url] in the documentation for more information. </description> <tutorials> <link title="Exporting for the Web: Calling JavaScript from script">https://docs.godotengine.org/en/latest/getting_started/workflow/export/exporting_for_web.html#calling-javascript-from-script</link> diff --git a/doc/classes/Joint3D.xml b/doc/classes/Joint3D.xml index 15bef960f6..107c638b9e 100644 --- a/doc/classes/Joint3D.xml +++ b/doc/classes/Joint3D.xml @@ -7,6 +7,7 @@ Joints are used to bind together two physics bodies. They have a solver priority and can define if the bodies of the two attached nodes should be able to collide with each other. </description> <tutorials> + <link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link> </tutorials> <methods> </methods> diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml index 5a1b4630d0..17c4b85346 100644 --- a/doc/classes/KinematicBody2D.xml +++ b/doc/classes/KinematicBody2D.xml @@ -6,11 +6,13 @@ <description> Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses: [b]Simulated motion:[/b] When these bodies are moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). - [b]Kinematic characters:[/b] KinematicBody2D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. + [b]Kinematic characters:[/b] KinematicBody2D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but don't require advanced physics. </description> <tutorials> <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link> <link title="Using KinematicBody2D">https://docs.godotengine.org/en/latest/tutorials/physics/using_kinematic_body_2d.html</link> + <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link> + <link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link> </tutorials> <methods> <method name="get_floor_normal" qualifiers="const"> @@ -33,7 +35,7 @@ <argument index="0" name="slide_idx" type="int"> </argument> <description> - Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last [method move_and_slide] call. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1). + Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last call to [method move_and_slide] or [method move_and_slide_with_snap]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1). [b]Example usage:[/b] [codeblock] for i in get_slide_count(): @@ -46,28 +48,28 @@ <return type="int"> </return> <description> - Returns the number of times the body collided and changed direction during the last call to [method move_and_slide]. + Returns the number of times the body collided and changed direction during the last call to [method move_and_slide] or [method move_and_slide_with_snap]. </description> </method> <method name="is_on_ceiling" qualifiers="const"> <return type="bool"> </return> <description> - Returns [code]true[/code] if the body is on the ceiling. Only updates when calling [method move_and_slide]. + Returns [code]true[/code] if the body is on the ceiling. Only updates when calling [method move_and_slide] or [method move_and_slide_with_snap]. </description> </method> <method name="is_on_floor" qualifiers="const"> <return type="bool"> </return> <description> - Returns [code]true[/code] if the body is on the floor. Only updates when calling [method move_and_slide]. + Returns [code]true[/code] if the body is on the floor. Only updates when calling [method move_and_slide] or [method move_and_slide_with_snap]. </description> </method> <method name="is_on_wall" qualifiers="const"> <return type="bool"> </return> <description> - Returns [code]true[/code] if the body is on a wall. Only updates when calling [method move_and_slide]. + Returns [code]true[/code] if the body is on a wall. Only updates when calling [method move_and_slide] or [method move_and_slide_with_snap]. </description> </method> <method name="move_and_collide"> @@ -102,7 +104,7 @@ <argument index="5" name="infinite_inertia" type="bool" default="true"> </argument> <description> - Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. + Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. diff --git a/doc/classes/KinematicBody3D.xml b/doc/classes/KinematicBody3D.xml index 5d9c7fd896..17a6034e9a 100644 --- a/doc/classes/KinematicBody3D.xml +++ b/doc/classes/KinematicBody3D.xml @@ -6,10 +6,14 @@ <description> Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses: [b]Simulated motion:[/b] When these bodies are moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). - [b]Kinematic characters:[/b] KinematicBody3D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. + [b]Kinematic characters:[/b] KinematicBody3D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but don't require advanced physics. </description> <tutorials> <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link> + <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="get_axis_lock" qualifiers="const"> @@ -41,35 +45,35 @@ <argument index="0" name="slide_idx" type="int"> </argument> <description> - Returns a [KinematicCollision3D], which contains information about a collision that occurred during the last [method move_and_slide] call. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1). + Returns a [KinematicCollision3D], which contains information about a collision that occurred during the last call to [method move_and_slide] or [method move_and_slide_with_snap]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1). </description> </method> <method name="get_slide_count" qualifiers="const"> <return type="int"> </return> <description> - Returns the number of times the body collided and changed direction during the last call to [method move_and_slide]. + Returns the number of times the body collided and changed direction during the last call to [method move_and_slide] or [method move_and_slide_with_snap]. </description> </method> <method name="is_on_ceiling" qualifiers="const"> <return type="bool"> </return> <description> - Returns [code]true[/code] if the body is on the ceiling. Only updates when calling [method move_and_slide]. + Returns [code]true[/code] if the body is on the ceiling. Only updates when calling [method move_and_slide] or [method move_and_slide_with_snap]. </description> </method> <method name="is_on_floor" qualifiers="const"> <return type="bool"> </return> <description> - Returns [code]true[/code] if the body is on the floor. Only updates when calling [method move_and_slide]. + Returns [code]true[/code] if the body is on the floor. Only updates when calling [method move_and_slide] or [method move_and_slide_with_snap]. </description> </method> <method name="is_on_wall" qualifiers="const"> <return type="bool"> </return> <description> - Returns [code]true[/code] if the body is on a wall. Only updates when calling [method move_and_slide]. + Returns [code]true[/code] if the body is on a wall. Only updates when calling [method move_and_slide] or [method move_and_slide_with_snap]. </description> </method> <method name="move_and_collide"> @@ -104,7 +108,7 @@ <argument index="5" name="infinite_inertia" type="bool" default="true"> </argument> <description> - Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. + Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 3318f2757d..570d7f075b 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -8,6 +8,7 @@ [b]Note:[/b] Contrarily to most other [Control]s, Label's [member Control.mouse_filter] defaults to [constant Control.MOUSE_FILTER_IGNORE] (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured [member Control.hint_tooltip], unless you change its mouse filter. </description> <tutorials> + <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> </tutorials> <methods> <method name="get_line_count" qualifiers="const"> diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml index c022e56a39..6c008e4f7e 100644 --- a/doc/classes/Light3D.xml +++ b/doc/classes/Light3D.xml @@ -8,6 +8,7 @@ </description> <tutorials> <link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="get_param" qualifiers="const"> diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml index 22fe4f6194..dec5d60cbb 100644 --- a/doc/classes/Line2D.xml +++ b/doc/classes/Line2D.xml @@ -7,6 +7,8 @@ A line through several points in 2D space. </description> <tutorials> + <link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link> + <link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link> </tutorials> <methods> <method name="add_point"> diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index 13d3355da5..fed936cc2f 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -5,6 +5,7 @@ </brief_description> <description> This kind of button is primarily used when the interaction with the button causes a context change (like linking to a web page). + See also [BaseButton] which contains common properties and methods associated with this node. </description> <tutorials> </tutorials> diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml index f3686876ca..10a7061bef 100644 --- a/doc/classes/Material.xml +++ b/doc/classes/Material.xml @@ -7,6 +7,8 @@ Material is a base [Resource] used for coloring and shading geometry. All materials inherit from it and almost all [VisualInstance3D] derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here. </description> <tutorials> + <link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> </methods> diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 316315f777..cf1fdb5ba6 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -6,6 +6,7 @@ <description> Special button that brings up a [PopupMenu] when clicked. New items can be created inside this [PopupMenu] using [code]get_popup().add_item("My Item Name")[/code]. You can also create them directly from the editor. To do so, select the [MenuButton] node, then in the toolbar at the top of the 2D editor, click [b]Items[/b] then click [b]Add[/b] in the popup. You will be able to give each items new properties. + See also [BaseButton] which contains common properties and methods associated with this node. </description> <tutorials> </tutorials> diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index 367099e455..78db09feee 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -7,6 +7,10 @@ Mesh is a type of [Resource] that contains vertex array-based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. </description> <tutorials> + <link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link> + <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="create_convex_shape" qualifiers="const"> @@ -44,7 +48,7 @@ <return type="AABB"> </return> <description> - Returns the smallest [AABB] enclosing this mesh. Not affected by [code]custom_aabb[/code]. + Returns the smallest [AABB] enclosing this mesh in local space. Not affected by [code]custom_aabb[/code]. See also [method VisualInstance3D.get_transformed_aabb]. [b]Note:[/b] This is only implemented for [ArrayMesh] and [PrimitiveMesh]. </description> </method> diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml index c569da2df1..82cd392cd3 100644 --- a/doc/classes/MeshInstance3D.xml +++ b/doc/classes/MeshInstance3D.xml @@ -7,6 +7,10 @@ MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reuse of geometry which can save on resources. When a [Mesh] has to be instanced more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead. </description> <tutorials> + <link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link> + <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="create_convex_collision"> diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml index ccf6172017..ad8bd6991d 100644 --- a/doc/classes/MeshLibrary.xml +++ b/doc/classes/MeshLibrary.xml @@ -7,6 +7,8 @@ A library of meshes. Contains a list of [Mesh] resources, each with a name and ID. Each item can also include collision and navigation shapes. This resource is used in [GridMap]. </description> <tutorials> + <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> </tutorials> <methods> <method name="clear"> diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 8a6c560cdd..e1b3ffa2e4 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -18,7 +18,7 @@ <return type="AABB"> </return> <description> - Returns the visibility axis-aligned bounding box. + Returns the visibility axis-aligned bounding box in local space. See also [method VisualInstance3D.get_transformed_aabb]. </description> </method> <method name="get_instance_color" qualifiers="const"> diff --git a/doc/classes/Navigation2D.xml b/doc/classes/Navigation2D.xml index dcbfbc2350..abac29bdb7 100644 --- a/doc/classes/Navigation2D.xml +++ b/doc/classes/Navigation2D.xml @@ -7,6 +7,7 @@ Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of [NavigationPolygon] resources. These are automatically collected from child [NavigationRegion2D] nodes. </description> <tutorials> + <link title="2D Navigation Demo">https://godotengine.org/asset-library/asset/117</link> </tutorials> <methods> <method name="get_closest_point" qualifiers="const"> diff --git a/doc/classes/Navigation3D.xml b/doc/classes/Navigation3D.xml index 807f0ad309..e7a4fe3c43 100644 --- a/doc/classes/Navigation3D.xml +++ b/doc/classes/Navigation3D.xml @@ -7,6 +7,7 @@ Provides navigation and pathfinding within a collection of [NavigationMesh]es. These will be automatically collected from child [NavigationRegion3D] nodes. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on. </description> <tutorials> + <link title="3D Navmesh Demo">https://godotengine.org/asset-library/asset/124</link> </tutorials> <methods> <method name="get_closest_point" qualifiers="const"> diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml index 6deca4394f..dd7464ac0e 100644 --- a/doc/classes/NavigationMesh.xml +++ b/doc/classes/NavigationMesh.xml @@ -5,6 +5,7 @@ <description> </description> <tutorials> + <link title="3D Navmesh Demo">https://godotengine.org/asset-library/asset/124</link> </tutorials> <methods> <method name="add_polygon"> @@ -80,14 +81,17 @@ <member name="agent/height" type="float" setter="set_agent_height" getter="get_agent_height" default="2.0"> </member> <member name="agent/max_climb" type="float" setter="set_agent_max_climb" getter="get_agent_max_climb" default="0.9"> + The maximum height difference between two areas for navigation to be generated between them. </member> <member name="agent/max_slope" type="float" setter="set_agent_max_slope" getter="get_agent_max_slope" default="45.0"> + The maximum angle a slope can be at for navigation to be generated on it. </member> <member name="agent/radius" type="float" setter="set_agent_radius" getter="get_agent_radius" default="0.6"> </member> <member name="cell/height" type="float" setter="set_cell_height" getter="get_cell_height" default="0.2"> </member> <member name="cell/size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.3"> + The size of cells in the [NavigationMesh]. </member> <member name="detail/sample_distance" type="float" setter="set_detail_sample_distance" getter="get_detail_sample_distance" default="6.0"> </member> @@ -104,18 +108,25 @@ <member name="filter/low_hanging_obstacles" type="bool" setter="set_filter_low_hanging_obstacles" getter="get_filter_low_hanging_obstacles" default="false"> </member> <member name="geometry/collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> + The physics layers used to generate the [NavigationMesh]. </member> <member name="geometry/parsed_geometry_type" type="int" setter="set_parsed_geometry_type" getter="get_parsed_geometry_type" default="0"> + What kind of geomerty is used to generate the [NavigationMesh]. </member> <member name="geometry/source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" default="0"> + Which geometry is used to generate the [NavigationMesh]. </member> <member name="geometry/source_group_name" type="StringName" setter="set_source_group_name" getter="get_source_group_name"> + The name of the group that is used to generate the [NavigationMesh]. </member> <member name="polygon/verts_per_poly" type="float" setter="set_verts_per_poly" getter="get_verts_per_poly" default="6.0"> + The number of vertices to use per polygon. Higher values will improve performance at the cost of lower precision. </member> <member name="region/merge_size" type="float" setter="set_region_merge_size" getter="get_region_merge_size" default="20.0"> + If two adjacent regions' edges are separated by a distance lower than this value, the regions will be merged together. </member> <member name="region/min_size" type="float" setter="set_region_min_size" getter="get_region_min_size" default="8.0"> + The minimum size of a region for it to be created. </member> <member name="sample_partition_type/sample_partition_type" type="int" setter="set_sample_partition_type" getter="get_sample_partition_type" default="0"> </member> diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml index b0f77dff83..e75efa3b27 100644 --- a/doc/classes/NavigationPolygon.xml +++ b/doc/classes/NavigationPolygon.xml @@ -24,6 +24,7 @@ [/codeblock] </description> <tutorials> + <link title="2D Navigation Demo">https://godotengine.org/asset-library/asset/117</link> </tutorials> <methods> <method name="add_outline"> diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml index 1b9099336c..5f0b04487e 100644 --- a/doc/classes/NavigationServer2D.xml +++ b/doc/classes/NavigationServer2D.xml @@ -7,6 +7,7 @@ NavigationServer2D is the server responsible for all 2D navigation. It creates the agents, maps, and regions for navigation to work as expected. This keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. </description> <tutorials> + <link title="2D Navigation Demo">https://godotengine.org/asset-library/asset/117</link> </tutorials> <methods> <method name="agent_create" qualifiers="const"> diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml index 1f621c3c81..95890c4b4c 100644 --- a/doc/classes/NavigationServer3D.xml +++ b/doc/classes/NavigationServer3D.xml @@ -7,6 +7,7 @@ NavigationServer3D is the server responsible for all 3D navigation. It creates the agents, maps, and regions for navigation to work as expected. This keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. </description> <tutorials> + <link title="3D Navmesh Demo">https://godotengine.org/asset-library/asset/124</link> </tutorials> <methods> <method name="agent_create" qualifiers="const"> diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml index 7e2a9af59f..954d31794a 100644 --- a/doc/classes/NetworkedMultiplayerPeer.xml +++ b/doc/classes/NetworkedMultiplayerPeer.xml @@ -8,6 +8,7 @@ </description> <tutorials> <link title="High-level multiplayer">https://docs.godotengine.org/en/latest/tutorials/networking/high_level_multiplayer.html</link> + <link title="WebRTC Signaling Demo">https://godotengine.org/asset-library/asset/537</link> </tutorials> <methods> <method name="get_connection_status" qualifiers="const"> diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml index 9c3acc9b0a..08ab01036c 100644 --- a/doc/classes/NinePatchRect.xml +++ b/doc/classes/NinePatchRect.xml @@ -45,13 +45,13 @@ The height of the 9-slice's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. </member> <member name="patch_margin_left" type="int" setter="set_patch_margin" getter="get_patch_margin" default="0"> - The height of the 9-slice's left column. + The width of the 9-slice's left column. A margin of 16 means the 9-slice's left corners and side will have a width of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. </member> <member name="patch_margin_right" type="int" setter="set_patch_margin" getter="get_patch_margin" default="0"> - The height of the 9-slice's right column. + The width of the 9-slice's right column. A margin of 16 means the 9-slice's right corners and side will have a width of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. </member> <member name="patch_margin_top" type="int" setter="set_patch_margin" getter="get_patch_margin" default="0"> - The height of the 9-slice's top row. + The height of the 9-slice's top row. A margin of 16 means the 9-slice's top corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. </member> <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one. If the rect is empty, NinePatchRect will use the whole texture. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index b342fc0813..623e4b099b 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -18,6 +18,7 @@ </description> <tutorials> <link title="Scenes and nodes">https://docs.godotengine.org/en/latest/getting_started/step_by_step/scenes_and_nodes.html</link> + <link title="All Demos">https://github.com/godotengine/godot-demo-projects/</link> </tutorials> <methods> <method name="_enter_tree" qualifiers="virtual"> @@ -525,7 +526,7 @@ â” â•´Menu ┃ â” â•´Label ┃ â”–â•´Camera2D - â”–-SplashScreen + â”–â•´SplashScreen â”–â•´Camera2D [/codeblock] </description> diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index 987a18f367..eed0ec8d7e 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -8,6 +8,7 @@ </description> <tutorials> <link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link> + <link title="All 2D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/2d</link> </tutorials> <methods> <method name="apply_scale"> diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index 1ef875f606..af4f18c5f7 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -10,6 +10,7 @@ </description> <tutorials> <link title="Introduction to 3D">https://docs.godotengine.org/en/latest/tutorials/3d/introduction_to_3d.html</link> + <link title="All 3D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/3d</link> </tutorials> <methods> <method name="force_update_transform"> @@ -83,13 +84,6 @@ Returns whether this node uses a scale of [code](1, 1, 1)[/code] or its local transformation scale. </description> </method> - <method name="is_set_as_toplevel" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns whether this node is set as Toplevel, that is whether it ignores its parent nodes transformations. - </description> - </method> <method name="is_transform_notification_enabled" qualifiers="const"> <return type="bool"> </return> @@ -195,15 +189,6 @@ Scales the local transformation by given 3D scale factors in object-local coordinate system. </description> </method> - <method name="set_as_toplevel"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> - <description> - Makes the node ignore its parents transformations. Node transformations are only in global space. - </description> - </method> <method name="set_disable_scale"> <return type="void"> </return> @@ -316,6 +301,9 @@ <member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3( 1, 1, 1 )"> Scale part of the local transformation. </member> + <member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level"> + If [code]true[/code], the node will not inherit its transformations from its parent. Node transformations are only in global space. + </member> <member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> Local space [Transform] of this node, with respect to the parent node. </member> diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml index dc7fd1be3f..658f0e6c28 100644 --- a/doc/classes/NodePath.xml +++ b/doc/classes/NodePath.xml @@ -22,6 +22,7 @@ [/codeblock] </description> <tutorials> + <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link> </tutorials> <methods> <method name="NodePath"> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 26110df335..1487c9e078 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -7,6 +7,7 @@ Operating System functions. OS wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, date and time, timers, environment variables, execution of binaries, command line, etc. </description> <tutorials> + <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> </tutorials> <methods> <method name="can_use_threads" qualifiers="const"> @@ -234,13 +235,6 @@ Returns the number of threads available on the host machine. </description> </method> - <method name="get_splash_tick_msec" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the amount of time in milliseconds it took for the boot logo to appear. - </description> - </method> <method name="get_static_memory_peak_usage" qualifiers="const"> <return type="int"> </return> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 2395ccd211..50d91c7943 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -395,7 +395,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Removes a given entry from the object's metadata. + Removes a given entry from the object's metadata. See also [method set_meta]. </description> </method> <method name="set"> @@ -464,7 +464,8 @@ <argument index="1" name="value" type="Variant"> </argument> <description> - Adds or changes a given entry in the object's metadata. Metadata are serialized, and can take any [Variant] value. + Adds, changes or removes a given entry in the object's metadata. Metadata are serialized and can take any [Variant] value. + To remove a given entry from the object's metadata, use [method remove_meta]. Metadata is also removed if its value is set to [code]null[/code]. This means you can also use [code]set_meta("name", null)[/code] to remove metadata for [code]"name"[/code]. </description> </method> <method name="set_script"> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index 8c4bbd6716..510f952fea 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -5,6 +5,7 @@ </brief_description> <description> OptionButton is a type button that provides a selectable list of items when pressed. The item selected becomes the "current" item and is displayed as the button text. + See also [BaseButton] which contains common properties and methods associated with this node. </description> <tutorials> </tutorials> diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml index 0fcfed0595..0b43522bce 100644 --- a/doc/classes/PackedByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -66,9 +66,8 @@ </argument> <description> Returns a new [PackedByteArray] with the data decompressed. Set the compression mode using one of [enum File.CompressionMode]'s constants. [b]This method only accepts gzip and deflate compression modes.[/b] - This method is potentially slower than [code]decompress[/code], as it may have to re-allocate it's output buffer multiple times while decompressing, where as [code]decompress[/code] knows it's output buffer size from the begining. - - GZIP has a maximal compression ratio of 1032:1, meaning it's very possible for a small compressed payload to decompress to a potentially very large output. To guard against this, you may provide a maximum size this function is allowed to allocate in bytes via [code]max_output_size[/code]. Passing -1 will allow for unbounded output. If any positive value is passed, and the decompression exceeds that ammount in bytes, then an error will be returned. + This method is potentially slower than [code]decompress[/code], as it may have to re-allocate it's output buffer multiple times while decompressing, where as [code]decompress[/code] knows it's output buffer size from the beginning. + GZIP has a maximal compression ratio of 1032:1, meaning it's very possible for a small compressed payload to decompress to a potentially very large output. To guard against this, you may provide a maximum size this function is allowed to allocate in bytes via [code]max_output_size[/code]. Passing -1 will allow for unbounded output. If any positive value is passed, and the decompression exceeds that amount in bytes, then an error will be returned. </description> </method> <method name="empty"> @@ -89,21 +88,21 @@ <return type="String"> </return> <description> - Converts UTF-16 encoded array to [String]. If the BOM is missing, system endianness is assumed. Returns empty string if source array is not vaild UTF-16 string. + Converts UTF-16 encoded array to [String]. If the BOM is missing, system endianness is assumed. Returns empty string if source array is not valid UTF-16 string. </description> </method> <method name="get_string_from_utf32"> <return type="String"> </return> <description> - Converts UTF-32 encoded array to [String]. System endianness is assumed. Returns empty string if source array is not vaild UTF-32 string. + Converts UTF-32 encoded array to [String]. System endianness is assumed. Returns empty string if source array is not valid UTF-32 string. </description> </method> <method name="get_string_from_utf8"> <return type="String"> </return> <description> - Converts UTF-8 encoded array to [String]. Slower than [method get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. Returns empty string if source array is not vaild UTF-8 string. + Converts UTF-8 encoded array to [String]. Slower than [method get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. Returns empty string if source array is not valid UTF-8 string. </description> </method> <method name="has"> diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index bb56330248..be40ab05de 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -38,6 +38,7 @@ [/codeblock] </description> <tutorials> + <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link> </tutorials> <methods> <method name="can_instance" qualifiers="const"> diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml index f36af66d6d..5f3a16ac73 100644 --- a/doc/classes/PackedStringArray.xml +++ b/doc/classes/PackedStringArray.xml @@ -8,6 +8,7 @@ [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> + <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> </tutorials> <methods> <method name="PackedStringArray"> diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml index ecc535e488..cb62aea95c 100644 --- a/doc/classes/PackedVector2Array.xml +++ b/doc/classes/PackedVector2Array.xml @@ -8,6 +8,7 @@ [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> + <link title="2D Navigation Astar Demo">https://godotengine.org/asset-library/asset/519</link> </tutorials> <methods> <method name="PackedVector2Array"> diff --git a/doc/classes/Panel.xml b/doc/classes/Panel.xml index 7285bc9e2e..b65c2c956d 100644 --- a/doc/classes/Panel.xml +++ b/doc/classes/Panel.xml @@ -7,6 +7,9 @@ Panel is a [Control] that displays an opaque background. It's commonly used as a parent and container for other types of [Control] nodes. </description> <tutorials> + <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link> + <link title="2D Finite State Machine Demo">https://godotengine.org/asset-library/asset/516</link> + <link title="3D Inverse Kinematics Demo">https://godotengine.org/asset-library/asset/523</link> </tutorials> <methods> </methods> diff --git a/doc/classes/PanelContainer.xml b/doc/classes/PanelContainer.xml index d39122c395..ad6080c780 100644 --- a/doc/classes/PanelContainer.xml +++ b/doc/classes/PanelContainer.xml @@ -7,6 +7,7 @@ Panel container type. This container fits controls inside of the delimited area of a stylebox. It's useful for giving controls an outline. </description> <tutorials> + <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link> </tutorials> <methods> </methods> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 38d65f6338..54c337faf9 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -9,6 +9,9 @@ [b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. </description> <tutorials> + <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> + <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> </tutorials> <methods> <method name="add_property_info"> @@ -555,6 +558,9 @@ <member name="input_devices/pointing/emulate_touch_from_mouse" type="bool" setter="" getter="" default="false"> If [code]true[/code], sends touch input events when clicking or dragging the mouse. </member> + <member name="input_devices/pointing/ios/touch_delay" type="float" setter="" getter="" default="0.150"> + Default delay for touch events. This only affects iOS devices. + </member> <member name="layer_names/2d_physics/layer_1" type="String" setter="" getter="" default=""""> Optional name for the 2D physics layer 1. </member> @@ -873,7 +879,7 @@ Size of the hash table used for the broad-phase 2D hash grid algorithm. </member> <member name="physics/2d/cell_size" type="int" setter="" getter="" default="128"> - Cell size used for the broad-phase 2D hash grid algorithm. + Cell size used for the broad-phase 2D hash grid algorithm (in pixels). </member> <member name="physics/2d/default_angular_damp" type="float" setter="" getter="" default="1.0"> The default angular damp in 2D. @@ -1199,7 +1205,7 @@ <member name="rendering/vulkan/staging_buffer/texture_upload_region_size_px" type="int" setter="" getter="" default="64"> </member> <member name="world/2d/cell_size" type="int" setter="" getter="" default="100"> - Cell size used for the 2D hash grid that [VisibilityNotifier2D] uses. + Cell size used for the 2D hash grid that [VisibilityNotifier2D] uses (in pixels). </member> </members> <constants> diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml index 422add08d1..24a3d76ee2 100644 --- a/doc/classes/QuadMesh.xml +++ b/doc/classes/QuadMesh.xml @@ -7,6 +7,8 @@ Class representing a square [PrimitiveMesh]. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Y axes; this default rotation is more suited for use with billboarded materials. Unlike [PlaneMesh], this mesh doesn't provide subdivision options. </description> <tutorials> + <link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link> + <link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link> </tutorials> <methods> </methods> diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml index 2218852dae..6c95e303b8 100644 --- a/doc/classes/Quat.xml +++ b/doc/classes/Quat.xml @@ -10,6 +10,7 @@ </description> <tutorials> <link title="Using 3D transforms">https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html#interpolating-with-quaternions</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="Quat"> diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml index 1d8edf0adb..d24e86a08b 100644 --- a/doc/classes/RayCast3D.xml +++ b/doc/classes/RayCast3D.xml @@ -12,6 +12,7 @@ </description> <tutorials> <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <methods> <method name="add_exception"> diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index fe05f14fa1..aaeaa7629d 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -5,10 +5,13 @@ </brief_description> <description> [Rect2] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. - It uses floating point coordinates. + It uses floating-point coordinates. If you need integer coordinates, use [Rect2i] instead. + The 3D counterpart to [Rect2] is [AABB]. </description> <tutorials> <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link> + <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link> </tutorials> <methods> <method name="Rect2"> diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml index 2fdfe7c24b..8b29daa264 100644 --- a/doc/classes/Rect2i.xml +++ b/doc/classes/Rect2i.xml @@ -5,10 +5,11 @@ </brief_description> <description> [Rect2i] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. - It uses integer coordinates. + It uses integer coordinates. If you need floating-point coordinates, use [Rect2] instead. </description> <tutorials> <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link> </tutorials> <methods> <method name="Rect2i"> diff --git a/doc/classes/RectangleShape2D.xml b/doc/classes/RectangleShape2D.xml index b42cc48d43..041416a24b 100644 --- a/doc/classes/RectangleShape2D.xml +++ b/doc/classes/RectangleShape2D.xml @@ -7,6 +7,8 @@ Rectangle shape for 2D collisions. This shape is useful for modeling box-like 2D objects. </description> <tutorials> + <link title="2D Pong Demo">https://godotengine.org/asset-library/asset/121</link> + <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link> </tutorials> <methods> </methods> diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index 1cf775f389..049613fa5d 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -6,9 +6,9 @@ <description> Singleton used to load resource files from the filesystem. It uses the many [ResourceFormatLoader] classes registered in the engine (either built-in or from a plugin) to load files into memory and convert them to a format that can be used by the engine. - GDScript has a simplified [method @GDScript.load] built-in method which can be used in most situations, leaving the use of [ResourceLoader] for more advanced scenarios. </description> <tutorials> + <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> </tutorials> <methods> <method name="exists"> @@ -65,7 +65,8 @@ The registered [ResourceFormatLoader]s are queried sequentially to find the first one which can handle the file's extension, and then attempt loading. If loading fails, the remaining ResourceFormatLoaders are also attempted. An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. If [code]no_cache[/code] is [code]true[/code], the resource cache will be bypassed and the resource will be loaded anew. Otherwise, the cached resource will be returned if it exists. - Returns an empty resource if no ResourceFormatLoader could handle the file. + Returns an empty resource if no [ResourceFormatLoader] could handle the file. + GDScript has a simplified [method @GDScript.load] built-in method which can be used in most situations, leaving the use of [ResourceLoader] for more advanced scenarios. </description> </method> <method name="load_threaded_get"> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index dc3c7c7dc0..faf0d97766 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -10,6 +10,8 @@ </description> <tutorials> <link title="BBCode in RichTextLabel">https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link> + <link title="GUI Rich Text/BBcode Demo">https://godotengine.org/asset-library/asset/132</link> + <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> </tutorials> <methods> <method name="add_image"> @@ -44,6 +46,7 @@ </argument> <description> Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns the result of the parsing, [constant OK] if successful. + [b]Note:[/b] Using this method, you can't close a tag that was opened in a previous [method append_bbcode] call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the [member bbcode_text] instead of using [method append_bbcode]. </description> </method> <method name="clear"> @@ -289,7 +292,7 @@ </member> <member name="bbcode_text" type="String" setter="set_bbcode" getter="get_bbcode" default=""""> The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited. - [b]Note:[/b] It is unadvised to use [code]+=[/code] operator with [code]bbcode_text[/code] (e.g. [code]bbcode_text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. Use [method append_bbcode] for adding text instead. + [b]Note:[/b] It is unadvised to use the [code]+=[/code] operator with [code]bbcode_text[/code] (e.g. [code]bbcode_text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. Use [method append_bbcode] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call. </member> <member name="custom_effects" type="Array" setter="set_effects" getter="get_effects" default="[ ]"> The currently installed custom effects. This is an array of [RichTextEffect]s. diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index f3d43b193e..eca5b8054d 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -12,6 +12,8 @@ The center of mass is always located at the node's origin without taking into account the [CollisionShape2D] centroid offsets. </description> <tutorials> + <link title="2D Physics Platformer Demo">https://godotengine.org/asset-library/asset/119</link> + <link title="Instancing Demo">https://godotengine.org/asset-library/asset/148</link> </tutorials> <methods> <method name="_integrate_forces" qualifiers="virtual"> @@ -136,7 +138,7 @@ </member> <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0"> The maximum number of contacts that will be recorded. Requires [member contact_monitor] to be set to [code]true[/code]. - [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). + [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end). </member> <member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" enum="RigidBody2D.CCDMode" default="0"> Continuous collision detection mode. diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml index e9ebf33aa7..8d92c8b066 100644 --- a/doc/classes/RigidBody3D.xml +++ b/doc/classes/RigidBody3D.xml @@ -12,6 +12,8 @@ </description> <tutorials> <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> + <link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link> + <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> </tutorials> <methods> <method name="_integrate_forces" qualifiers="virtual"> diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml index 20b0750431..d5a32dd20c 100644 --- a/doc/classes/ScriptEditor.xml +++ b/doc/classes/ScriptEditor.xml @@ -86,6 +86,7 @@ <argument index="1" name="base_path" type="String"> </argument> <description> + Opens the script create dialog. The script will extend [code]base_name[/code]. The file extension can be omitted from [code]base_path[/code]. It will be added based on the selected scripting language. </description> </method> <method name="register_syntax_highlighter"> diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index 7ec8fe12fb..fe2cc1f5ad 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -9,6 +9,8 @@ Note that "global pose" below refers to the overall transform of the bone with respect to skeleton, so it not the actual global/world transform of the bone. </description> <tutorials> + <link title="3D Inverse Kinematics Demo">https://godotengine.org/asset-library/asset/523</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="add_bone"> diff --git a/doc/classes/SkeletonIK3D.xml b/doc/classes/SkeletonIK3D.xml index de83847403..5193109447 100644 --- a/doc/classes/SkeletonIK3D.xml +++ b/doc/classes/SkeletonIK3D.xml @@ -5,6 +5,7 @@ <description> </description> <tutorials> + <link title="3D Inverse Kinematics Demo">https://godotengine.org/asset-library/asset/523</link> </tutorials> <methods> <method name="get_parent_skeleton" qualifiers="const"> diff --git a/doc/classes/SphereShape3D.xml b/doc/classes/SphereShape3D.xml index 1eaf890639..e90493fca2 100644 --- a/doc/classes/SphereShape3D.xml +++ b/doc/classes/SphereShape3D.xml @@ -7,6 +7,7 @@ Sphere shape for 3D collisions, which can be set into a [PhysicsBody3D] or [Area3D]. This shape is useful for modeling sphere-like 3D objects. </description> <tutorials> + <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> </tutorials> <methods> </methods> diff --git a/doc/classes/SpotLight3D.xml b/doc/classes/SpotLight3D.xml index fc849baa8d..f868503bbd 100644 --- a/doc/classes/SpotLight3D.xml +++ b/doc/classes/SpotLight3D.xml @@ -8,6 +8,7 @@ </description> <tutorials> <link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> </methods> diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml index f218631038..8205889ea7 100644 --- a/doc/classes/Sprite2D.xml +++ b/doc/classes/Sprite2D.xml @@ -7,6 +7,7 @@ A node that displays a 2D texture. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. </description> <tutorials> + <link title="Instancing Demo">https://godotengine.org/asset-library/asset/148</link> </tutorials> <methods> <method name="get_rect" qualifiers="const"> diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml index 934471c445..f9b947fa3d 100644 --- a/doc/classes/Sprite3D.xml +++ b/doc/classes/Sprite3D.xml @@ -4,8 +4,7 @@ 2D sprite node in a 3D world. </brief_description> <description> - A node that displays a 2D texture in a 3D environment. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. - [b]Note:[/b] There are [url=https://github.com/godotengine/godot/issues/20855]known performance issues[/url] when using [Sprite3D]. Consider using a [MeshInstance3D] with a [QuadMesh] as the mesh instead. You can still have billboarding by enabling billboard properties in the QuadMesh's [StandardMaterial3D]. + A node that displays a 2D texture in a 3D environment. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. See also [SpriteBase3D] where properties such as the billboard mode are defined. </description> <tutorials> </tutorials> diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml index 479dc5f94c..44b08408c1 100644 --- a/doc/classes/SpriteBase3D.xml +++ b/doc/classes/SpriteBase3D.xml @@ -4,7 +4,7 @@ 2D sprite node in 3D environment. </brief_description> <description> - A node that displays 2D texture information in a 3D environment. + A node that displays 2D texture information in a 3D environment. See also [Sprite3D] where many other properties are defined. </description> <tutorials> </tutorials> @@ -13,6 +13,7 @@ <return type="TriangleMesh"> </return> <description> + Returns a [TriangleMesh] with the sprite's vertices following its current configuration (such as its [member axis] and [member pixel_size]). </description> </method> <method name="get_draw_flag" qualifiers="const"> @@ -39,17 +40,19 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> - If [code]true[/code], the specified flag will be enabled. + If [code]true[/code], the specified flag will be enabled. See [enum SpriteBase3D.DrawFlags] for a list of flags. </description> </method> </methods> <members> <member name="alpha_cut" type="int" setter="set_alpha_cut_mode" getter="get_alpha_cut_mode" enum="SpriteBase3D.AlphaCutMode" default="0"> + The alpha cutting mode to use for the sprite. See [enum AlphaCutMode] for possible values. </member> <member name="axis" type="int" setter="set_axis" getter="get_axis" enum="Vector3.Axis" default="2"> The direction in which the front of the texture faces. </member> <member name="billboard" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="BaseMaterial3D.BillboardMode" default="0"> + The billboard mode to use for the sprite. See [enum BaseMaterial3D.BillboardMode] for possible values. </member> <member name="centered" type="bool" setter="set_centered" getter="is_centered" default="true"> If [code]true[/code], texture will be centered. @@ -90,16 +93,19 @@ If set, lights in the environment affect the sprite. </constant> <constant name="FLAG_DOUBLE_SIDED" value="2" enum="DrawFlags"> - If set, texture can be seen from the back as well, if not, it is invisible when looking at it from behind. + If set, texture can be seen from the back as well. If not, the texture is invisible when looking at it from behind. </constant> <constant name="FLAG_MAX" value="3" enum="DrawFlags"> Represents the size of the [enum DrawFlags] enum. </constant> <constant name="ALPHA_CUT_DISABLED" value="0" enum="AlphaCutMode"> + This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping. </constant> <constant name="ALPHA_CUT_DISCARD" value="1" enum="AlphaCutMode"> + This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see [member ProjectSettings.rendering/quality/screen_filters/screen_space_aa]). On the bright side, this mode doesn't suffer from transparency sorting issues when multiple transparent materials are overlapping. This mode is also known as [i]alpha testing[/i] or [i]1-bit transparency[/i]. </constant> <constant name="ALPHA_CUT_OPAQUE_PREPASS" value="2" enum="AlphaCutMode"> + This mode draws fully opaque pixels in the depth prepass. This is slower than [constant ALPHA_CUT_DISABLED] or [constant ALPHA_CUT_DISCARD], but it allows displaying translucent areas and smooth edges while using proper sorting. </constant> </constants> </class> diff --git a/doc/classes/StaticBody3D.xml b/doc/classes/StaticBody3D.xml index c896efc314..63a15cbe1d 100644 --- a/doc/classes/StaticBody3D.xml +++ b/doc/classes/StaticBody3D.xml @@ -8,6 +8,9 @@ Additionally, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). </description> <tutorials> + <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <methods> </methods> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 40fff25fc4..4034a5ee07 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -342,7 +342,10 @@ <argument index="0" name="to" type="String"> </argument> <description> - Performs a case-sensitive comparison to another string. Returns [code]-1[/code] if less than, [code]+1[/code] if greater than, or [code]0[/code] if equal. + Performs a case-sensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/code] of each string, which roughly matches the alphabetical order. + [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters. + [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty. + To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to] and [method naturalnocasecmp_to]. </description> </method> <method name="count"> @@ -615,7 +618,7 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if this string contains a valid IP address. + Returns [code]true[/code] if this string contains only a well-formatted IPv4 or IPv6 address. This method considers [url=https://en.wikipedia.org/wiki/Reserved_IP_addresses]reserved IP addresses[/url] such as [code]0.0.0.0[/code] as valid. </description> </method> <method name="join"> @@ -712,7 +715,11 @@ <argument index="0" name="to" type="String"> </argument> <description> - Performs a case-insensitive natural order comparison to another string. Returns [code]-1[/code] if less than, [code]+1[/code] if greater than, or [code]0[/code] if equal. + Performs a case-insensitive [i]natural order[/i] comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/code] of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison. + When used for sorting, natural order comparison will order suites of numbers as expected by most people. If you sort the numbers from 1 to 10 using natural order, you will get [code][1, 2, 3, ...][/code] instead of [code][1, 10, 2, 3, ...][/code]. + [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters. + [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty. + To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to] and [method casecmp_to]. </description> </method> <method name="nocasecmp_to"> @@ -721,7 +728,10 @@ <argument index="0" name="to" type="String"> </argument> <description> - Performs a case-insensitive comparison to another string. Returns [code]-1[/code] if less than, [code]+1[/code] if greater than, or [code]0[/code] if equal. + Performs a case-insensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/code] of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison. + [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters. + [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty. + To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method casecmp_to] and [method naturalnocasecmp_to]. </description> </method> <method name="ord_at"> diff --git a/doc/classes/SubViewport.xml b/doc/classes/SubViewport.xml index c9c7589631..4736401395 100644 --- a/doc/classes/SubViewport.xml +++ b/doc/classes/SubViewport.xml @@ -1,10 +1,19 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="SubViewport" inherits="Viewport" version="4.0"> <brief_description> + Creates a sub-view into the screen. </brief_description> <description> </description> <tutorials> + <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> + <link title="Viewports tutorial index">https://docs.godotengine.org/en/latest/tutorials/viewports/index.html</link> + <link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link> + <link title="3D in 2D Demo">https://godotengine.org/asset-library/asset/128</link> + <link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link> + <link title="Screen Capture Demo">https://godotengine.org/asset-library/asset/130</link> + <link title="Dynamic Split Screen Demo">https://godotengine.org/asset-library/asset/541</link> + <link title="3D Viewport Scaling Demo">https://godotengine.org/asset-library/asset/586</link> </tutorials> <methods> </methods> diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index eeb6b6cd9d..385e31ccc7 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -19,6 +19,7 @@ [b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes. </description> <tutorials> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <methods> <method name="add_bones"> diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml index a5172586fe..70bf138f27 100644 --- a/doc/classes/TextureButton.xml +++ b/doc/classes/TextureButton.xml @@ -6,8 +6,10 @@ <description> [TextureButton] has the same functionality as [Button], except it uses sprites instead of Godot's [Theme] resource. It is faster to create, but it doesn't support localization like more complex [Control]s. The "normal" state must contain a texture ([member texture_normal]); other textures are optional. + See also [BaseButton] which contains common properties and methods associated with this node. </description> <tutorials> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <methods> </methods> diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml index 709d87b858..743e7f6d1e 100644 --- a/doc/classes/TextureRect.xml +++ b/doc/classes/TextureRect.xml @@ -7,6 +7,7 @@ Used to draw icons and sprites in a user interface. The texture's placement can be controlled with the [member stretch_mode] property. It can scale, tile, or stay centered inside its bounding rectangle. </description> <tutorials> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <methods> </methods> diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml index 46377ecf20..88f46e3937 100644 --- a/doc/classes/Thread.xml +++ b/doc/classes/Thread.xml @@ -10,6 +10,7 @@ <tutorials> <link title="Using multiple threads">https://docs.godotengine.org/en/latest/tutorials/threads/using_multiple_threads.html</link> <link title="Thread-safe APIs">https://docs.godotengine.org/en/latest/tutorials/threads/thread_safe_apis.html</link> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <methods> <method name="get_id" qualifiers="const"> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 2780545f55..371ba80723 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -8,6 +8,12 @@ </description> <tutorials> <link title="Using Tilemaps">https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link> + <link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link> + <link title="2D Isometric Demo">https://godotengine.org/asset-library/asset/112</link> + <link title="2D Hexagonal Demo">https://godotengine.org/asset-library/asset/111</link> + <link title="2D Navigation Astar Demo">https://godotengine.org/asset-library/asset/519</link> + <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link> + <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link> </tutorials> <methods> <method name="clear"> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index 4991a1e58b..9ab9d9ca7a 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -8,6 +8,13 @@ Tiles are referenced by a unique integer ID. </description> <tutorials> + <link title="Using Tilemaps">https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link> + <link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link> + <link title="2D Isometric Demo">https://godotengine.org/asset-library/asset/112</link> + <link title="2D Hexagonal Demo">https://godotengine.org/asset-library/asset/111</link> + <link title="2D Navigation Astar Demo">https://godotengine.org/asset-library/asset/519</link> + <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link> + <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link> </tutorials> <methods> <method name="_forward_atlas_subtile_selection" qualifiers="virtual"> diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml index 5d684755fa..ab75e21ce8 100644 --- a/doc/classes/Timer.xml +++ b/doc/classes/Timer.xml @@ -8,6 +8,7 @@ [b]Note:[/b] To create an one-shot timer without instantiating a node, use [method SceneTree.create_timer]. </description> <tutorials> + <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> </tutorials> <methods> <method name="is_stopped" qualifiers="const"> diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml index 09dfe56f8f..52dda75dff 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform.xml @@ -11,6 +11,9 @@ <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> <link title="Matrices and transforms">https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link> <link title="Using 3D transforms">https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link> + <link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> + <link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link> </tutorials> <methods> <method name="Transform"> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 5da88892fe..b23bb4d33b 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -8,7 +8,10 @@ For more information, read the "Matrices and transforms" documentation article. </description> <tutorials> + <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> <link title="Matrices and transforms">https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link> + <link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link> + <link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link> </tutorials> <methods> <method name="Transform2D"> diff --git a/doc/classes/VBoxContainer.xml b/doc/classes/VBoxContainer.xml index 6b32a08f93..213f8fd742 100644 --- a/doc/classes/VBoxContainer.xml +++ b/doc/classes/VBoxContainer.xml @@ -7,6 +7,7 @@ Vertical box container. See [BoxContainer]. </description> <tutorials> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> </tutorials> <methods> </methods> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 52d719b6f7..025d6474ee 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -10,6 +10,11 @@ </description> <tutorials> <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link> + <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link> + <link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link> + <link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link> + <link title="All 2D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/2d</link> </tutorials> <methods> <method name="Vector2"> @@ -182,7 +187,7 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if the vector is normalized, and false otherwise. + Returns [code]true[/code] if the vector is normalized, [code]false[/code] otherwise. </description> </method> <method name="length"> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index 3ad926210b..75ddc46dab 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -10,6 +10,8 @@ </description> <tutorials> <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link> + <link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link> </tutorials> <methods> <method name="Vector2i"> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 608b976f6f..b26fe09e91 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -10,6 +10,11 @@ </description> <tutorials> <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link> + <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link> + <link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link> + <link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link> + <link title="All 3D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/3d</link> </tutorials> <methods> <method name="Vector3"> @@ -157,7 +162,7 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if the vector is normalized, and false otherwise. + Returns [code]true[/code] if the vector is normalized, [code]false[/code] otherwise. </description> </method> <method name="length"> diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index bd7c354241..f977b81ce7 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -10,6 +10,8 @@ </description> <tutorials> <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link> + <link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link> </tutorials> <methods> <method name="Vector3i"> diff --git a/doc/classes/VehicleBody3D.xml b/doc/classes/VehicleBody3D.xml index 5a2cce376e..1125a1da94 100644 --- a/doc/classes/VehicleBody3D.xml +++ b/doc/classes/VehicleBody3D.xml @@ -9,6 +9,7 @@ [b]Note:[/b] This class has known issues and isn't designed to provide realistic 3D vehicle physics. If you want advanced vehicle physics, you will probably have to write your own physics integration using another [PhysicsBody3D] class. </description> <tutorials> + <link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link> </tutorials> <methods> </methods> diff --git a/doc/classes/VehicleWheel3D.xml b/doc/classes/VehicleWheel3D.xml index 97b2abfa92..fb0cb03d1c 100644 --- a/doc/classes/VehicleWheel3D.xml +++ b/doc/classes/VehicleWheel3D.xml @@ -8,6 +8,7 @@ [b]Note:[/b] This class has known issues and isn't designed to provide realistic 3D vehicle physics. If you want advanced vehicle physics, you will probably have to write your own physics integration using another [PhysicsBody3D] class. </description> <tutorials> + <link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link> </tutorials> <methods> <method name="get_rpm" qualifiers="const"> diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index 91c8ad0a77..60f0a40159 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -5,7 +5,7 @@ </brief_description> <description> Control node for playing video streams using [VideoStream] resources. - Supported video formats are [url=https://www.webmproject.org/]WebM[/url] ([VideoStreamWebm]), [url=https://www.theora.org/]Ogg Theora[/url] ([VideoStreamTheora]), and any format exposed via a GDNative plugin using [VideoStreamGDNative]. + Supported video formats are [url=https://www.webmproject.org/]WebM[/url] ([code].webm[/code], [VideoStreamWebm]), [url=https://www.theora.org/]Ogg Theora[/url] ([code].ogv[/code], [VideoStreamTheora]), and any format exposed via a GDNative plugin using [VideoStreamGDNative]. </description> <tutorials> </tutorials> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index e42c4021ab..84974874de 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -14,6 +14,12 @@ <tutorials> <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> <link title="Viewports tutorial index">https://docs.godotengine.org/en/latest/tutorials/viewports/index.html</link> + <link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link> + <link title="3D in 2D Demo">https://godotengine.org/asset-library/asset/128</link> + <link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link> + <link title="Screen Capture Demo">https://godotengine.org/asset-library/asset/130</link> + <link title="Dynamic Split Screen Demo">https://godotengine.org/asset-library/asset/541</link> + <link title="3D Viewport Scaling Demo">https://godotengine.org/asset-library/asset/586</link> </tutorials> <methods> <method name="find_world_2d" qualifiers="const"> diff --git a/doc/classes/ViewportTexture.xml b/doc/classes/ViewportTexture.xml index 14b460a43b..393f1bb0b8 100644 --- a/doc/classes/ViewportTexture.xml +++ b/doc/classes/ViewportTexture.xml @@ -8,6 +8,10 @@ To create a ViewportTexture in code, use the [method Viewport.get_texture] method on the target viewport. </description> <tutorials> + <link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link> + <link title="3D in 2D Demo">https://godotengine.org/asset-library/asset/128</link> + <link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link> + <link title="3D Viewport Scaling Demo">https://godotengine.org/asset-library/asset/586</link> </tutorials> <methods> </methods> diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml index 314a100989..761438b77e 100644 --- a/doc/classes/VisibilityNotifier2D.xml +++ b/doc/classes/VisibilityNotifier2D.xml @@ -9,6 +9,7 @@ [b]Note:[/b] For performance reasons, VisibilityNotifier2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need precise visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node. </description> <tutorials> + <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> </tutorials> <methods> <method name="is_on_screen" qualifiers="const"> diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml index 6451b3f330..01d569d9c8 100644 --- a/doc/classes/VisualInstance3D.xml +++ b/doc/classes/VisualInstance3D.xml @@ -13,7 +13,7 @@ <return type="AABB"> </return> <description> - Returns the [AABB] (also known as the bounding box) for this [VisualInstance3D]. + Returns the [AABB] (also known as the bounding box) for this [VisualInstance3D]. See also [method get_transformed_aabb]. </description> </method> <method name="get_base" qualifiers="const"> @@ -44,7 +44,7 @@ </return> <description> Returns the transformed [AABB] (also known as the bounding box) for this [VisualInstance3D]. - Transformed in this case means the [AABB] plus the position, rotation, and scale of the [Node3D]'s [Transform]. + Transformed in this case means the [AABB] plus the position, rotation, and scale of the [Node3D]'s [Transform]. See also [method get_aabb]. </description> </method> <method name="set_base"> diff --git a/doc/classes/VisualShaderNodeMultiplyAdd.xml b/doc/classes/VisualShaderNodeMultiplyAdd.xml index ba79b3fe8f..daa9e02753 100644 --- a/doc/classes/VisualShaderNodeMultiplyAdd.xml +++ b/doc/classes/VisualShaderNodeMultiplyAdd.xml @@ -11,19 +11,19 @@ <methods> </methods> <members> - <member name="type" type="int" setter="set_type" getter="get_type" enum="VisualShaderNodeMultiplyAdd.Type" default="0"> + <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeMultiplyAdd.OpType" default="0"> A type of operands and returned value. </member> </members> <constants> - <constant name="TYPE_SCALAR" value="0" enum="Type"> + <constant name="OP_TYPE_SCALAR" value="0" enum="OpType"> A scalar type. </constant> - <constant name="TYPE_VECTOR" value="1" enum="Type"> + <constant name="OP_TYPE_VECTOR" value="1" enum="OpType"> A vector type. </constant> - <constant name="TYPE_MAX" value="2" enum="Type"> - Represents the size of the [enum Type] enum. + <constant name="OP_TYPE_MAX" value="2" enum="OpType"> + Represents the size of the [enum OpType] enum. </constant> </constants> </class> diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml index f9f0241365..c1cf639ec0 100644 --- a/doc/classes/WorldEnvironment.xml +++ b/doc/classes/WorldEnvironment.xml @@ -10,6 +10,9 @@ </description> <tutorials> <link title="Environment and post-processing">https://docs.godotengine.org/en/latest/tutorials/3d/environment_and_post_processing.html</link> + <link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link> + <link title="2D HDR Demo">https://godotengine.org/asset-library/asset/110</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> </methods> diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml index 869fc14d40..ce4d000a9b 100644 --- a/doc/classes/bool.xml +++ b/doc/classes/bool.xml @@ -6,36 +6,87 @@ <description> Boolean is a built-in type. There are two boolean values: [code]true[/code] and [code]false[/code]. You can think of it as an switch with on or off (1 or 0) setting. Booleans are used in programming for logic in condition statements, like [code]if[/code] statements. Booleans can be directly used in [code]if[/code] statements. The code below demonstrates this on the [code]if can_shoot:[/code] line. You don't need to use [code]== true[/code], you only need [code]if can_shoot:[/code]. Similarly, use [code]if not can_shoot:[/code] rather than [code]== false[/code]. - [codeblock] - var can_shoot = true + [codeblocks] + [gdscript] + var _can_shoot = true func shoot(): - if can_shoot: + if _can_shoot: pass # Perform shooting actions here. - [/codeblock] + [/gdscript] + [csharp] + private bool _canShoot = true; + + public void Shoot() + { + if (_canShoot) + { + // Perform shooting actions here. + } + } + [/csharp] + [/codeblocks] The following code will only create a bullet if both conditions are met: action "shoot" is pressed and if [code]can_shoot[/code] is [code]true[/code]. [b]Note:[/b] [code]Input.is_action_pressed("shoot")[/code] is also a boolean that is [code]true[/code] when "shoot" is pressed and [code]false[/code] when "shoot" isn't pressed. - [codeblock] - var can_shoot = true + [codeblocks] + [gdscript] + var _can_shoot = true func shoot(): - if can_shoot and Input.is_action_pressed("shoot"): + if _can_shoot and Input.is_action_pressed("shoot"): create_bullet() - [/codeblock] + [/gdscript] + [csharp] + private bool _canShoot = true; + + public void Shoot() + { + if (_canShoot && Input.IsActionPressed("shoot")) + { + CreateBullet(); + } + } + [/csharp] + [/codeblocks] The following code will set [code]can_shoot[/code] to [code]false[/code] and start a timer. This will prevent player from shooting until the timer runs out. Next [code]can_shoot[/code] will be set to [code]true[/code] again allowing player to shoot once again. - [codeblock] - var can_shoot = true - onready var cool_down = $CoolDownTimer + [gdscript] + var _can_shoot = true + onready var _cool_down = $CoolDownTimer func shoot(): - if can_shoot and Input.is_action_pressed("shoot"): + if _can_shoot and Input.is_action_pressed("shoot"): create_bullet() - can_shoot = false - cool_down.start() + _can_shoot = false + _cool_down.start() func _on_CoolDownTimer_timeout(): - can_shoot = true - [/codeblock] + _can_shoot = true + [/gdscript] + [csharp] + private bool _canShoot = true; + private Timer _coolDown; + + public override void _Ready() + { + _coolDown = GetNode<Timer>("CoolDownTimer"); + } + + public void Shoot() + { + if (_canShoot && Input.IsActionPressed("shoot")) + { + CreateBullet(); + _canShoot = false; + _coolDown.Start(); + } + } + + public void OnCoolDownTimerTimeout() + { + _canShoot = true; + } + [/csharp] + [/codeblocks] </description> <tutorials> </tutorials> diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index b594f652b3..ed147f31cd 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -1041,7 +1041,7 @@ def make_footer(): # type: () -> str return ( ".. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`\n" ".. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`\n" - ".. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`" + ".. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`\n" ) # fmt: on diff --git a/doc/translations/ar.po b/doc/translations/ar.po index eae5d09b38..1857e45627 100644 --- a/doc/translations/ar.po +++ b/doc/translations/ar.po @@ -11069,7 +11069,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14163,7 +14163,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32615,7 +32615,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/ca.po b/doc/translations/ca.po index caa43cfa3a..2e5c7e2c84 100644 --- a/doc/translations/ca.po +++ b/doc/translations/ca.po @@ -11100,7 +11100,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14194,7 +14194,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32646,7 +32646,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/classes.pot b/doc/translations/classes.pot index 0e89e02762..41c20b05ea 100644 --- a/doc/translations/classes.pot +++ b/doc/translations/classes.pot @@ -11070,7 +11070,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14164,7 +14164,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32616,7 +32616,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" @@ -41208,7 +41208,7 @@ msgid "" "result, it should not be depended upon for reproducible random streams " "across Godot versions.\n" "To generate a random float number (within a given range) based on a time-" -"dependant seed:\n" +"dependent seed:\n" "[codeblock]\n" "var rng = RandomNumberGenerator.new()\n" "func _ready():\n" diff --git a/doc/translations/cs.po b/doc/translations/cs.po index 8f8cb7da91..8d94351710 100644 --- a/doc/translations/cs.po +++ b/doc/translations/cs.po @@ -11562,7 +11562,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14656,7 +14656,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -33115,7 +33115,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/de.po b/doc/translations/de.po index 740d4eed12..95b73f8257 100644 --- a/doc/translations/de.po +++ b/doc/translations/de.po @@ -11385,7 +11385,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14492,7 +14492,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -33032,7 +33032,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/es.po b/doc/translations/es.po index 4d71c12010..ef6012b240 100644 --- a/doc/translations/es.po +++ b/doc/translations/es.po @@ -14573,10 +14573,10 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" "Devuelve [code]true[/code] si el nodo está configurado como de nivel " -"superior. Ver [method set_as_toplevel]." +"superior. Ver [method set_as_top_level]." #: doc/classes/CanvasItem.xml:530 msgid "" @@ -18642,7 +18642,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -44207,10 +44207,10 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" -"Devuelve si este nodo se establece como Toplevel, es decir, si ignora las " +"Devuelve si este nodo se establece como top_level, es decir, si ignora las " "transformaciones de sus nodos padres." #: doc/classes/Node3D.xml:97 diff --git a/doc/translations/fa.po b/doc/translations/fa.po index 874d3273c3..06d6ee47d7 100644 --- a/doc/translations/fa.po +++ b/doc/translations/fa.po @@ -11075,7 +11075,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14169,7 +14169,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32621,7 +32621,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/fi.po b/doc/translations/fi.po index 3163a6131f..02ac9fdd76 100644 --- a/doc/translations/fi.po +++ b/doc/translations/fi.po @@ -11088,7 +11088,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14182,7 +14182,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32634,7 +32634,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/fr.po b/doc/translations/fr.po index 55434729e5..a8075d919d 100644 --- a/doc/translations/fr.po +++ b/doc/translations/fr.po @@ -11406,7 +11406,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14500,7 +14500,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32982,7 +32982,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/id.po b/doc/translations/id.po index 246cf15495..b686ef8de6 100644 --- a/doc/translations/id.po +++ b/doc/translations/id.po @@ -11101,7 +11101,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14195,7 +14195,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32647,7 +32647,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/it.po b/doc/translations/it.po index 8a8ec5d107..f664268ebe 100644 --- a/doc/translations/it.po +++ b/doc/translations/it.po @@ -11359,7 +11359,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14453,7 +14453,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32913,7 +32913,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/ja.po b/doc/translations/ja.po index 02072678ef..9727ca0cd3 100644 --- a/doc/translations/ja.po +++ b/doc/translations/ja.po @@ -12289,7 +12289,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -15383,7 +15383,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -33885,7 +33885,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/ko.po b/doc/translations/ko.po index ddc892b659..f69b5f00c0 100644 --- a/doc/translations/ko.po +++ b/doc/translations/ko.po @@ -11077,7 +11077,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14171,7 +14171,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32623,7 +32623,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/nl.po b/doc/translations/nl.po index 4f840c229c..17bd3db383 100644 --- a/doc/translations/nl.po +++ b/doc/translations/nl.po @@ -11103,7 +11103,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14197,7 +14197,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32649,7 +32649,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/pl.po b/doc/translations/pl.po index b3817aa5f6..fd494dc656 100644 --- a/doc/translations/pl.po +++ b/doc/translations/pl.po @@ -11121,7 +11121,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14215,7 +14215,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32668,7 +32668,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/pt_BR.po b/doc/translations/pt_BR.po index 89460c5caf..2e8337989f 100644 --- a/doc/translations/pt_BR.po +++ b/doc/translations/pt_BR.po @@ -11116,7 +11116,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14210,7 +14210,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32662,7 +32662,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/ro.po b/doc/translations/ro.po index fb47ddb0dc..f7e5e0f86f 100644 --- a/doc/translations/ro.po +++ b/doc/translations/ro.po @@ -11077,7 +11077,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14171,7 +14171,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32623,7 +32623,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/ru.po b/doc/translations/ru.po index 83c3440a64..6a397ec35d 100644 --- a/doc/translations/ru.po +++ b/doc/translations/ru.po @@ -11582,7 +11582,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14676,7 +14676,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -33160,7 +33160,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/sr_Cyrl.po b/doc/translations/sr_Cyrl.po index 6d0bd44ba7..156fbabfc0 100644 --- a/doc/translations/sr_Cyrl.po +++ b/doc/translations/sr_Cyrl.po @@ -11087,7 +11087,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14181,7 +14181,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32633,7 +32633,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/th.po b/doc/translations/th.po index 5753295ef4..cbcbc51f63 100644 --- a/doc/translations/th.po +++ b/doc/translations/th.po @@ -11093,7 +11093,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14187,7 +14187,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32639,7 +32639,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/tr.po b/doc/translations/tr.po index 0e5992ad0e..33208243f8 100644 --- a/doc/translations/tr.po +++ b/doc/translations/tr.po @@ -11069,7 +11069,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14163,7 +14163,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32615,7 +32615,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/uk.po b/doc/translations/uk.po index e94a78591f..45da6d19aa 100644 --- a/doc/translations/uk.po +++ b/doc/translations/uk.po @@ -11155,7 +11155,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14249,7 +14249,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32701,7 +32701,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/zh_Hans.po b/doc/translations/zh_Hans.po index 08e9667c29..2e9d14c0d8 100644 --- a/doc/translations/zh_Hans.po +++ b/doc/translations/zh_Hans.po @@ -11302,7 +11302,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14396,7 +14396,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32851,7 +32851,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/doc/translations/zh_Hant.po b/doc/translations/zh_Hant.po index e09b693f6e..9483576d0e 100644 --- a/doc/translations/zh_Hant.po +++ b/doc/translations/zh_Hant.po @@ -11106,7 +11106,7 @@ msgstr "" #: doc/classes/CanvasItem.xml:523 msgid "" "Returns [code]true[/code] if the node is set as top-level. See [method " -"set_as_toplevel]." +"set_as_top_level]." msgstr "" #: doc/classes/CanvasItem.xml:530 @@ -14200,7 +14200,7 @@ msgstr "" #: doc/classes/Control.xml:545 msgid "" -"Invalidates the size cache in this node and in parent nodes up to toplevel. " +"Invalidates the size cache in this node and in parent nodes up to top_level. " "Intended to be used with [method get_minimum_size] when the return value is " "changed. Setting [member rect_min_size] directly calls this method " "automatically." @@ -32652,7 +32652,7 @@ msgstr "" #: doc/classes/Node3D.xml:90 msgid "" -"Returns whether this node is set as Toplevel, that is whether it ignores its " +"Returns whether this node is set as top_level, that is whether it ignores its " "parent nodes transformations." msgstr "" diff --git a/drivers/SCsub b/drivers/SCsub index c812057138..e2ac9ee01e 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -32,15 +32,6 @@ else: SConscript("png/SCsub") SConscript("spirv-reflect/SCsub") -if env["vsproj"]: - import os - - path = os.getcwd() - # Change directory so the path resolves correctly in the function call. - os.chdir("..") - env.AddToVSProject(env.drivers_sources) - os.chdir(path) - env.add_source_files(env.drivers_sources, "*.cpp") lib = env.add_library("drivers", env.drivers_sources) diff --git a/drivers/dummy/rasterizer_dummy.h b/drivers/dummy/rasterizer_dummy.h index 5947d7a5e5..bdb51b1573 100644 --- a/drivers/dummy/rasterizer_dummy.h +++ b/drivers/dummy/rasterizer_dummy.h @@ -42,142 +42,137 @@ class RasterizerSceneDummy : public RasterizerScene { public: /* SHADOW ATLAS API */ - RID shadow_atlas_create() { return RID(); } - void shadow_atlas_set_size(RID p_atlas, int p_size) {} - void shadow_atlas_set_quadrant_subdivision(RID p_atlas, int p_quadrant, int p_subdivision) {} - bool shadow_atlas_update_light(RID p_atlas, RID p_light_intance, float p_coverage, uint64_t p_light_version) { return false; } + RID shadow_atlas_create() override { return RID(); } + void shadow_atlas_set_size(RID p_atlas, int p_size) override {} + void shadow_atlas_set_quadrant_subdivision(RID p_atlas, int p_quadrant, int p_subdivision) override {} + bool shadow_atlas_update_light(RID p_atlas, RID p_light_intance, float p_coverage, uint64_t p_light_version) override { return false; } - void directional_shadow_atlas_set_size(int p_size) {} - int get_directional_light_shadow_size(RID p_light_intance) { return 0; } - void set_directional_shadow_count(int p_count) {} + void directional_shadow_atlas_set_size(int p_size) override {} + int get_directional_light_shadow_size(RID p_light_intance) override { return 0; } + void set_directional_shadow_count(int p_count) override {} /* SDFGI UPDATE */ - virtual void sdfgi_update(RID p_render_buffers, RID p_environment, const Vector3 &p_world_position) {} - virtual int sdfgi_get_pending_region_count(RID p_render_buffers) const { return 0; } - virtual AABB sdfgi_get_pending_region_bounds(RID p_render_buffers, int p_region) const { return AABB(); } - virtual uint32_t sdfgi_get_pending_region_cascade(RID p_render_buffers, int p_region) const { return 0; } - virtual void sdfgi_update_probes(RID p_render_buffers, RID p_environment, const RID *p_directional_light_instances, uint32_t p_directional_light_count, const RID *p_positional_light_instances, uint32_t p_positional_light_count) {} + void sdfgi_update(RID p_render_buffers, RID p_environment, const Vector3 &p_world_position) override {} + int sdfgi_get_pending_region_count(RID p_render_buffers) const override { return 0; } + AABB sdfgi_get_pending_region_bounds(RID p_render_buffers, int p_region) const override { return AABB(); } + uint32_t sdfgi_get_pending_region_cascade(RID p_render_buffers, int p_region) const override { return 0; } + void sdfgi_update_probes(RID p_render_buffers, RID p_environment, const RID *p_directional_light_instances, uint32_t p_directional_light_count, const RID *p_positional_light_instances, uint32_t p_positional_light_count) override {} /* SKY API */ - RID sky_create() { return RID(); } - void sky_set_radiance_size(RID p_sky, int p_radiance_size) {} - void sky_set_mode(RID p_sky, RS::SkyMode p_samples) {} - void sky_set_texture(RID p_sky, RID p_panorama) {} - void sky_set_texture(RID p_sky, RID p_cube_map, int p_radiance_size) {} - void sky_set_material(RID p_sky, RID p_material) {} - virtual Ref<Image> sky_bake_panorama(RID p_sky, float p_energy, bool p_bake_irradiance, const Size2i &p_size) { return Ref<Image>(); } + RID sky_create() override { return RID(); } + void sky_set_radiance_size(RID p_sky, int p_radiance_size) override {} + void sky_set_mode(RID p_sky, RS::SkyMode p_samples) override {} + void sky_set_material(RID p_sky, RID p_material) override {} + Ref<Image> sky_bake_panorama(RID p_sky, float p_energy, bool p_bake_irradiance, const Size2i &p_size) override { return Ref<Image>(); } /* ENVIRONMENT API */ - RID environment_create() { return RID(); } + RID environment_create() override { return RID(); } - void environment_set_background(RID p_env, RS::EnvironmentBG p_bg) {} - void environment_set_sky(RID p_env, RID p_sky) {} - void environment_set_sky_custom_fov(RID p_env, float p_scale) {} - void environment_set_sky_orientation(RID p_env, const Basis &p_orientation) {} - void environment_set_bg_color(RID p_env, const Color &p_color) {} - void environment_set_bg_energy(RID p_env, float p_energy) {} - void environment_set_canvas_max_layer(RID p_env, int p_max_layer) {} - void environment_set_ambient_light(RID p_env, const Color &p_color, RS::EnvironmentAmbientSource p_ambient = RS::ENV_AMBIENT_SOURCE_BG, float p_energy = 1.0, float p_sky_contribution = 0.0, RS::EnvironmentReflectionSource p_reflection_source = RS::ENV_REFLECTION_SOURCE_BG, const Color &p_ao_color = Color()) {} -// FIXME: Disabled during Vulkan refactoring, should be ported. -#if 0 - void environment_set_camera_feed_id(RID p_env, int p_camera_feed_id) {} -#endif + void environment_set_background(RID p_env, RS::EnvironmentBG p_bg) override {} + void environment_set_sky(RID p_env, RID p_sky) override {} + void environment_set_sky_custom_fov(RID p_env, float p_scale) override {} + void environment_set_sky_orientation(RID p_env, const Basis &p_orientation) override {} + void environment_set_bg_color(RID p_env, const Color &p_color) override {} + void environment_set_bg_energy(RID p_env, float p_energy) override {} + void environment_set_canvas_max_layer(RID p_env, int p_max_layer) override {} + void environment_set_ambient_light(RID p_env, const Color &p_color, RS::EnvironmentAmbientSource p_ambient = RS::ENV_AMBIENT_SOURCE_BG, float p_energy = 1.0, float p_sky_contribution = 0.0, RS::EnvironmentReflectionSource p_reflection_source = RS::ENV_REFLECTION_SOURCE_BG, const Color &p_ao_color = Color()) override {} - void environment_set_glow(RID p_env, bool p_enable, int p_level_flags, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap) {} - virtual void environment_glow_set_use_bicubic_upscale(bool p_enable) {} - virtual void environment_glow_set_use_high_quality(bool p_enable) {} - void environment_set_fog(RID p_env, bool p_enable, float p_begin, float p_end, RID p_gradient_texture) {} + void environment_set_glow(RID p_env, bool p_enable, int p_level_flags, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap) override {} + void environment_glow_set_use_bicubic_upscale(bool p_enable) override {} + void environment_glow_set_use_high_quality(bool p_enable) override {} - void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance) {} - virtual void environment_set_ssr_roughness_quality(RS::EnvironmentSSRRoughnessQuality p_quality) {} - virtual void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_bias, float p_light_affect, float p_ao_channel_affect, RS::EnvironmentSSAOBlur p_blur, float p_bilateral_sharpness) {} - virtual void environment_set_ssao_quality(RS::EnvironmentSSAOQuality p_quality, bool p_half_size) {} + void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance) override {} + void environment_set_ssr_roughness_quality(RS::EnvironmentSSRRoughnessQuality p_quality) override {} + void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_bias, float p_light_affect, float p_ao_channel_affect, RS::EnvironmentSSAOBlur p_blur, float p_bilateral_sharpness) override {} + void environment_set_ssao_quality(RS::EnvironmentSSAOQuality p_quality, bool p_half_size) override {} - virtual void environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, bool p_use_multibounce, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) {} + void environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, bool p_use_multibounce, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) override {} - virtual void environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) {} - virtual void environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames) {} + void environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) override {} + void environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames) override {} - void environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) {} + void environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) override {} - void environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, RID p_ramp) {} + void environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, RID p_ramp) override {} - void environment_set_fog(RID p_env, bool p_enable, const Color &p_color, const Color &p_sun_color, float p_sun_amount) {} - void environment_set_fog_depth(RID p_env, bool p_enable, float p_depth_begin, float p_depth_end, float p_depth_curve, bool p_transmit, float p_transmit_curve) {} - void environment_set_fog_height(RID p_env, bool p_enable, float p_min_height, float p_max_height, float p_height_curve) {} + void environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density) override {} + void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_light, float p_light_energy, float p_length, float p_detail_spread, float p_gi_inject, RS::EnvVolumetricFogShadowFilter p_shadow_filter) override {} + void environment_set_volumetric_fog_volume_size(int p_size, int p_depth) override {} + void environment_set_volumetric_fog_filter_active(bool p_enable) override {} + void environment_set_volumetric_fog_directional_shadow_shrink_size(int p_shrink_size) override {} + void environment_set_volumetric_fog_positional_shadow_shrink_size(int p_shrink_size) override {} - virtual Ref<Image> environment_bake_panorama(RID p_env, bool p_bake_irradiance, const Size2i &p_size) { return Ref<Image>(); } + Ref<Image> environment_bake_panorama(RID p_env, bool p_bake_irradiance, const Size2i &p_size) override { return Ref<Image>(); } - bool is_environment(RID p_env) const { return false; } - RS::EnvironmentBG environment_get_background(RID p_env) const { return RS::ENV_BG_KEEP; } - int environment_get_canvas_max_layer(RID p_env) const { return 0; } + bool is_environment(RID p_env) const override { return false; } + RS::EnvironmentBG environment_get_background(RID p_env) const override { return RS::ENV_BG_KEEP; } + int environment_get_canvas_max_layer(RID p_env) const override { return 0; } - virtual RID camera_effects_create() { return RID(); } + RID camera_effects_create() override { return RID(); } - virtual void camera_effects_set_dof_blur_quality(RS::DOFBlurQuality p_quality, bool p_use_jitter) {} - virtual void camera_effects_set_dof_blur_bokeh_shape(RS::DOFBokehShape p_shape) {} + void camera_effects_set_dof_blur_quality(RS::DOFBlurQuality p_quality, bool p_use_jitter) override {} + void camera_effects_set_dof_blur_bokeh_shape(RS::DOFBokehShape p_shape) override {} - virtual void camera_effects_set_dof_blur(RID p_camera_effects, bool p_far_enable, float p_far_distance, float p_far_transition, bool p_near_enable, float p_near_distance, float p_near_transition, float p_amount) {} - virtual void camera_effects_set_custom_exposure(RID p_camera_effects, bool p_enable, float p_exposure) {} + void camera_effects_set_dof_blur(RID p_camera_effects, bool p_far_enable, float p_far_distance, float p_far_transition, bool p_near_enable, float p_near_distance, float p_near_transition, float p_amount) override {} + void camera_effects_set_custom_exposure(RID p_camera_effects, bool p_enable, float p_exposure) override {} - virtual void shadows_quality_set(RS::ShadowQuality p_quality) {} - virtual void directional_shadow_quality_set(RS::ShadowQuality p_quality) {} + void shadows_quality_set(RS::ShadowQuality p_quality) override {} + void directional_shadow_quality_set(RS::ShadowQuality p_quality) override {} - RID light_instance_create(RID p_light) { return RID(); } - void light_instance_set_transform(RID p_light_instance, const Transform &p_transform) {} - virtual void light_instance_set_aabb(RID p_light_instance, const AABB &p_aabb) {} - void light_instance_set_shadow_transform(RID p_light_instance, const CameraMatrix &p_projection, const Transform &p_transform, float p_far, float p_split, int p_pass, float p_shadow_texel_size, float p_bias_scale = 1.0, float p_range_begin = 0, const Vector2 &p_uv_scale = Vector2()) {} - void light_instance_mark_visible(RID p_light_instance) {} + RID light_instance_create(RID p_light) override { return RID(); } + void light_instance_set_transform(RID p_light_instance, const Transform &p_transform) override {} + void light_instance_set_aabb(RID p_light_instance, const AABB &p_aabb) override {} + void light_instance_set_shadow_transform(RID p_light_instance, const CameraMatrix &p_projection, const Transform &p_transform, float p_far, float p_split, int p_pass, float p_shadow_texel_size, float p_bias_scale = 1.0, float p_range_begin = 0, const Vector2 &p_uv_scale = Vector2()) override {} + void light_instance_mark_visible(RID p_light_instance) override {} - RID reflection_atlas_create() { return RID(); } - virtual void reflection_atlas_set_size(RID p_ref_atlas, int p_reflection_size, int p_reflection_count) {} + RID reflection_atlas_create() override { return RID(); } + void reflection_atlas_set_size(RID p_ref_atlas, int p_reflection_size, int p_reflection_count) override {} - RID reflection_probe_instance_create(RID p_probe) { return RID(); } - void reflection_probe_instance_set_transform(RID p_instance, const Transform &p_transform) {} - void reflection_probe_release_atlas_index(RID p_instance) {} - bool reflection_probe_instance_needs_redraw(RID p_instance) { return false; } - bool reflection_probe_instance_has_reflection(RID p_instance) { return false; } - bool reflection_probe_instance_begin_render(RID p_instance, RID p_reflection_atlas) { return false; } - bool reflection_probe_instance_postprocess_step(RID p_instance) { return true; } + RID reflection_probe_instance_create(RID p_probe) override { return RID(); } + void reflection_probe_instance_set_transform(RID p_instance, const Transform &p_transform) override {} + void reflection_probe_release_atlas_index(RID p_instance) override {} + bool reflection_probe_instance_needs_redraw(RID p_instance) override { return false; } + bool reflection_probe_instance_has_reflection(RID p_instance) override { return false; } + bool reflection_probe_instance_begin_render(RID p_instance, RID p_reflection_atlas) override { return false; } + bool reflection_probe_instance_postprocess_step(RID p_instance) override { return true; } - virtual RID decal_instance_create(RID p_decal) { return RID(); } - virtual void decal_instance_set_transform(RID p_decal, const Transform &p_transform) {} + RID decal_instance_create(RID p_decal) override { return RID(); } + void decal_instance_set_transform(RID p_decal, const Transform &p_transform) override {} - virtual RID gi_probe_instance_create(RID p_gi_probe) { return RID(); } - void gi_probe_instance_set_light_data(RID p_probe, RID p_base, RID p_data) {} - void gi_probe_instance_set_transform_to_data(RID p_probe, const Transform &p_xform) {} - virtual bool gi_probe_needs_update(RID p_probe) const { return false; } - virtual void gi_probe_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, int p_dynamic_object_count, InstanceBase **p_dynamic_objects) {} + RID gi_probe_instance_create(RID p_gi_probe) override { return RID(); } + void gi_probe_instance_set_transform_to_data(RID p_probe, const Transform &p_xform) override {} + bool gi_probe_needs_update(RID p_probe) const override { return false; } + void gi_probe_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, int p_dynamic_object_count, InstanceBase **p_dynamic_objects) override {} - virtual void gi_probe_set_quality(RS::GIProbeQuality) {} + void gi_probe_set_quality(RS::GIProbeQuality) override {} - virtual void render_scene(RID p_render_buffers, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, InstanceBase **p_cull_result, int p_cull_count, RID *p_light_cull_result, int p_light_cull_count, RID *p_reflection_probe_cull_result, int p_reflection_probe_cull_count, RID *p_gi_probe_cull_result, int p_gi_probe_cull_count, RID *p_decal_cull_result, int p_decal_cull_count, InstanceBase **p_lightmap_cull_result, int p_lightmap_cull_count, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass) {} - void render_shadow(RID p_light, RID p_shadow_atlas, int p_pass, InstanceBase **p_cull_result, int p_cull_count) {} - virtual void render_material(const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, InstanceBase **p_cull_result, int p_cull_count, RID p_framebuffer, const Rect2i &p_region) {} - virtual void render_sdfgi(RID p_render_buffers, int p_region, InstanceBase **p_cull_result, int p_cull_count) {} - virtual void render_sdfgi_static_lights(RID p_render_buffers, uint32_t p_cascade_count, const uint32_t *p_cascade_indices, const RID **p_positional_light_cull_result, const uint32_t *p_positional_light_cull_count) {} + void render_scene(RID p_render_buffers, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, InstanceBase **p_cull_result, int p_cull_count, RID *p_light_cull_result, int p_light_cull_count, RID *p_reflection_probe_cull_result, int p_reflection_probe_cull_count, RID *p_gi_probe_cull_result, int p_gi_probe_cull_count, RID *p_decal_cull_result, int p_decal_cull_count, InstanceBase **p_lightmap_cull_result, int p_lightmap_cull_count, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass) override {} + void render_shadow(RID p_light, RID p_shadow_atlas, int p_pass, InstanceBase **p_cull_result, int p_cull_count) override {} + void render_material(const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, InstanceBase **p_cull_result, int p_cull_count, RID p_framebuffer, const Rect2i &p_region) override {} + void render_sdfgi(RID p_render_buffers, int p_region, InstanceBase **p_cull_result, int p_cull_count) override {} + void render_sdfgi_static_lights(RID p_render_buffers, uint32_t p_cascade_count, const uint32_t *p_cascade_indices, const RID **p_positional_light_cull_result, const uint32_t *p_positional_light_cull_count) override {} - void set_scene_pass(uint64_t p_pass) {} - virtual void set_time(double p_time, double p_step) {} - void set_debug_draw_mode(RS::ViewportDebugDraw p_debug_draw) {} + void set_scene_pass(uint64_t p_pass) override {} + void set_time(double p_time, double p_step) override {} + void set_debug_draw_mode(RS::ViewportDebugDraw p_debug_draw) override {} - virtual RID render_buffers_create() { return RID(); } - virtual void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_width, int p_height, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa) {} + RID render_buffers_create() override { return RID(); } + void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_width, int p_height, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa) override {} - virtual void screen_space_roughness_limiter_set_active(bool p_enable, float p_amount, float p_curve) {} - virtual bool screen_space_roughness_limiter_is_active() const { return false; } + void screen_space_roughness_limiter_set_active(bool p_enable, float p_amount, float p_curve) override {} + bool screen_space_roughness_limiter_is_active() const override { return false; } - virtual void sub_surface_scattering_set_quality(RS::SubSurfaceScatteringQuality p_quality) {} - virtual void sub_surface_scattering_set_scale(float p_scale, float p_depth_scale) {} + void sub_surface_scattering_set_quality(RS::SubSurfaceScatteringQuality p_quality) override {} + void sub_surface_scattering_set_scale(float p_scale, float p_depth_scale) override {} - virtual TypedArray<Image> bake_render_uv2(RID p_base, const Vector<RID> &p_material_overrides, const Size2i &p_image_size) { return TypedArray<Image>(); } + TypedArray<Image> bake_render_uv2(RID p_base, const Vector<RID> &p_material_overrides, const Size2i &p_image_size) override { return TypedArray<Image>(); } - bool free(RID p_rid) { return true; } - virtual void update() {} - virtual void sdfgi_set_debug_probe_select(const Vector3 &p_position, const Vector3 &p_dir) {} + bool free(RID p_rid) override { return true; } + void update() override {} + void sdfgi_set_debug_probe_select(const Vector3 &p_position, const Vector3 &p_dir) override {} RasterizerSceneDummy() {} ~RasterizerSceneDummy() {} @@ -216,54 +211,54 @@ public: mutable RID_PtrOwner<DummyTexture> texture_owner; mutable RID_PtrOwner<DummyMesh> mesh_owner; - virtual RID texture_2d_create(const Ref<Image> &p_image) { return RID(); } - virtual RID texture_2d_layered_create(const Vector<Ref<Image>> &p_layers, RS::TextureLayeredType p_layered_type) { return RID(); } - virtual RID texture_3d_create(const Vector<Ref<Image>> &p_slices) { return RID(); } - virtual RID texture_proxy_create(RID p_base) { return RID(); } + RID texture_2d_create(const Ref<Image> &p_image) override { return RID(); } + RID texture_2d_layered_create(const Vector<Ref<Image>> &p_layers, RS::TextureLayeredType p_layered_type) override { return RID(); } + RID texture_3d_create(Image::Format, int p_width, int p_height, int p_depth, bool p_mipmaps, const Vector<Ref<Image>> &p_data) override { return RID(); } + RID texture_proxy_create(RID p_base) override { return RID(); } - virtual void texture_2d_update_immediate(RID p_texture, const Ref<Image> &p_image, int p_layer = 0) {} - virtual void texture_2d_update(RID p_texture, const Ref<Image> &p_image, int p_layer = 0) {} - virtual void texture_3d_update(RID p_texture, const Ref<Image> &p_image, int p_depth, int p_mipmap) {} - virtual void texture_proxy_update(RID p_proxy, RID p_base) {} + void texture_2d_update_immediate(RID p_texture, const Ref<Image> &p_image, int p_layer = 0) override {} + void texture_2d_update(RID p_texture, const Ref<Image> &p_image, int p_layer = 0) override {} + void texture_3d_update(RID p_texture, const Vector<Ref<Image>> &p_data) override {} + void texture_proxy_update(RID p_proxy, RID p_base) override {} - virtual RID texture_2d_placeholder_create() { return RID(); } - virtual RID texture_2d_layered_placeholder_create(RenderingServer::TextureLayeredType p_layered_type) { return RID(); } - virtual RID texture_3d_placeholder_create() { return RID(); } + RID texture_2d_placeholder_create() override { return RID(); } + RID texture_2d_layered_placeholder_create(RenderingServer::TextureLayeredType p_layered_type) override { return RID(); } + RID texture_3d_placeholder_create() override { return RID(); } - virtual Ref<Image> texture_2d_get(RID p_texture) const { return Ref<Image>(); } - virtual Ref<Image> texture_2d_layer_get(RID p_texture, int p_layer) const { return Ref<Image>(); } - virtual Ref<Image> texture_3d_slice_get(RID p_texture, int p_depth, int p_mipmap) const { return Ref<Image>(); } + Ref<Image> texture_2d_get(RID p_texture) const override { return Ref<Image>(); } + Ref<Image> texture_2d_layer_get(RID p_texture, int p_layer) const override { return Ref<Image>(); } + Vector<Ref<Image>> texture_3d_get(RID p_texture) const override { return Vector<Ref<Image>>(); } - virtual void texture_replace(RID p_texture, RID p_by_texture) {} - virtual void texture_set_size_override(RID p_texture, int p_width, int p_height) {} + void texture_replace(RID p_texture, RID p_by_texture) override {} + void texture_set_size_override(RID p_texture, int p_width, int p_height) override {} // FIXME: Disabled during Vulkan refactoring, should be ported. #if 0 - virtual void texture_bind(RID p_texture, uint32_t p_texture_no) = 0; + void texture_bind(RID p_texture, uint32_t p_texture_no) = 0; #endif - virtual void texture_set_path(RID p_texture, const String &p_path) {} - virtual String texture_get_path(RID p_texture) const { return String(); } + void texture_set_path(RID p_texture, const String &p_path) override {} + String texture_get_path(RID p_texture) const override { return String(); } - virtual void texture_set_detect_3d_callback(RID p_texture, RS::TextureDetectCallback p_callback, void *p_userdata) {} - virtual void texture_set_detect_normal_callback(RID p_texture, RS::TextureDetectCallback p_callback, void *p_userdata) {} - virtual void texture_set_detect_roughness_callback(RID p_texture, RS::TextureDetectRoughnessCallback p_callback, void *p_userdata) {} + void texture_set_detect_3d_callback(RID p_texture, RS::TextureDetectCallback p_callback, void *p_userdata) override {} + void texture_set_detect_normal_callback(RID p_texture, RS::TextureDetectCallback p_callback, void *p_userdata) override {} + void texture_set_detect_roughness_callback(RID p_texture, RS::TextureDetectRoughnessCallback p_callback, void *p_userdata) override {} - virtual void texture_debug_usage(List<RS::TextureInfo> *r_info) {} - virtual void texture_set_force_redraw_if_visible(RID p_texture, bool p_enable) {} - virtual Size2 texture_size_with_proxy(RID p_proxy) { return Size2(); } + void texture_debug_usage(List<RS::TextureInfo> *r_info) override {} + void texture_set_force_redraw_if_visible(RID p_texture, bool p_enable) override {} + Size2 texture_size_with_proxy(RID p_proxy) override { return Size2(); } - virtual void texture_add_to_decal_atlas(RID p_texture, bool p_panorama_to_dp = false) {} - virtual void texture_remove_from_decal_atlas(RID p_texture, bool p_panorama_to_dp = false) {} + void texture_add_to_decal_atlas(RID p_texture, bool p_panorama_to_dp = false) override {} + void texture_remove_from_decal_atlas(RID p_texture, bool p_panorama_to_dp = false) override {} #if 0 - RID texture_create() { + RID texture_create() override { DummyTexture *texture = memnew(DummyTexture); ERR_FAIL_COND_V(!texture, RID()); return texture_owner.make_rid(texture); } - void texture_allocate(RID p_texture, int p_width, int p_height, int p_depth_3d, Image::Format p_format, RenderingServer::TextureType p_type = RS::TEXTURE_TYPE_2D, uint32_t p_flags = RS::TEXTURE_FLAGS_DEFAULT) { + void texture_allocate(RID p_texture, int p_width, int p_height, int p_depth_3d, Image::Format p_format, RenderingServer::TextureType p_type = RS::TEXTURE_TYPE_2D, uint32_t p_flags = RS::TEXTURE_FLAGS_DEFAULT) override { DummyTexture *t = texture_owner.getornull(p_texture); ERR_FAIL_COND(!t); t->width = p_width; @@ -273,7 +268,7 @@ public: t->image = Ref<Image>(memnew(Image)); t->image->create(p_width, p_height, false, p_format); } - void texture_set_data(RID p_texture, const Ref<Image> &p_image, int p_level) { + void texture_set_data(RID p_texture, const Ref<Image> &p_image, int p_level) override { DummyTexture *t = texture_owner.getornull(p_texture); ERR_FAIL_COND(!t); t->width = p_image->get_width(); @@ -282,7 +277,7 @@ public: t->image->create(t->width, t->height, false, t->format, p_image->get_data()); } - void texture_set_data_partial(RID p_texture, const Ref<Image> &p_image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int p_dst_mip, int p_level) { + void texture_set_data_partial(RID p_texture, const Ref<Image> &p_image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int p_dst_mip, int p_level) override { DummyTexture *t = texture_owner.getornull(p_texture); ERR_FAIL_COND(!t); @@ -295,100 +290,95 @@ public: t->image->blit_rect(p_image, Rect2(src_x, src_y, src_w, src_h), Vector2(dst_x, dst_y)); } - Ref<Image> texture_get_data(RID p_texture, int p_level) const { + Ref<Image> texture_get_data(RID p_texture, int p_level) const override { DummyTexture *t = texture_owner.getornull(p_texture); ERR_FAIL_COND_V(!t, Ref<Image>()); return t->image; } - void texture_set_flags(RID p_texture, uint32_t p_flags) { + void texture_set_flags(RID p_texture, uint32_t p_flags) override { DummyTexture *t = texture_owner.getornull(p_texture); ERR_FAIL_COND(!t); t->flags = p_flags; } - uint32_t texture_get_flags(RID p_texture) const { + uint32_t texture_get_flags(RID p_texture) const override { DummyTexture *t = texture_owner.getornull(p_texture); ERR_FAIL_COND_V(!t, 0); return t->flags; } - Image::Format texture_get_format(RID p_texture) const { + Image::Format texture_get_format(RID p_texture) const override { DummyTexture *t = texture_owner.getornull(p_texture); ERR_FAIL_COND_V(!t, Image::FORMAT_RGB8); return t->format; } - RenderingServer::TextureType texture_get_type(RID p_texture) const { return RS::TEXTURE_TYPE_2D; } - uint32_t texture_get_texid(RID p_texture) const { return 0; } - uint32_t texture_get_width(RID p_texture) const { return 0; } - uint32_t texture_get_height(RID p_texture) const { return 0; } - uint32_t texture_get_depth(RID p_texture) const { return 0; } - void texture_set_size_override(RID p_texture, int p_width, int p_height, int p_depth_3d) {} - void texture_bind(RID p_texture, uint32_t p_texture_no) {} + RenderingServer::TextureType texture_get_type(RID p_texture) const override { return RS::TEXTURE_TYPE_2D; } + uint32_t texture_get_texid(RID p_texture) const override { return 0; } + uint32_t texture_get_width(RID p_texture) const override { return 0; } + uint32_t texture_get_height(RID p_texture) const override { return 0; } + uint32_t texture_get_depth(RID p_texture) const override { return 0; } + void texture_set_size_override(RID p_texture, int p_width, int p_height, int p_depth_3d) override {} + void texture_bind(RID p_texture, uint32_t p_texture_no) override {} - void texture_set_path(RID p_texture, const String &p_path) { + void texture_set_path(RID p_texture, const String &p_path) override { DummyTexture *t = texture_owner.getornull(p_texture); ERR_FAIL_COND(!t); t->path = p_path; } - String texture_get_path(RID p_texture) const { + String texture_get_path(RID p_texture) const override { DummyTexture *t = texture_owner.getornull(p_texture); ERR_FAIL_COND_V(!t, String()); return t->path; } - void texture_set_shrink_all_x2_on_set_data(bool p_enable) {} + void texture_set_shrink_all_x2_on_set_data(bool p_enable) override {} - void texture_debug_usage(List<RS::TextureInfo> *r_info) {} + void texture_debug_usage(List<RS::TextureInfo> *r_info) override {} - RID texture_create_radiance_cubemap(RID p_source, int p_resolution = -1) const { return RID(); } + RID texture_create_radiance_cubemap(RID p_source, int p_resolution = -1) const override { return RID(); } - void texture_set_detect_3d_callback(RID p_texture, RenderingServer::TextureDetectCallback p_callback, void *p_userdata) {} - void texture_set_detect_srgb_callback(RID p_texture, RenderingServer::TextureDetectCallback p_callback, void *p_userdata) {} - void texture_set_detect_normal_callback(RID p_texture, RenderingServer::TextureDetectCallback p_callback, void *p_userdata) {} + void texture_set_detect_3d_callback(RID p_texture, RenderingServer::TextureDetectCallback p_callback, void *p_userdata) override {} + void texture_set_detect_srgb_callback(RID p_texture, RenderingServer::TextureDetectCallback p_callback, void *p_userdata) override {} + void texture_set_detect_normal_callback(RID p_texture, RenderingServer::TextureDetectCallback p_callback, void *p_userdata) override {} - void textures_keep_original(bool p_enable) {} + void textures_keep_original(bool p_enable) override {} - void texture_set_proxy(RID p_proxy, RID p_base) {} - virtual Size2 texture_size_with_proxy(RID p_texture) const { return Size2(); } - void texture_set_force_redraw_if_visible(RID p_texture, bool p_enable) {} + void texture_set_proxy(RID p_proxy, RID p_base) override {} + Size2 texture_size_with_proxy(RID p_texture) const override { return Size2(); } + void texture_set_force_redraw_if_visible(RID p_texture, bool p_enable) override {} #endif - /* SKY API */ - - RID sky_create() { return RID(); } - void sky_set_texture(RID p_sky, RID p_cube_map, int p_radiance_size) {} - /* SHADER API */ - RID shader_create() { return RID(); } + RID shader_create() override { return RID(); } - void shader_set_code(RID p_shader, const String &p_code) {} - String shader_get_code(RID p_shader) const { return ""; } - void shader_get_param_list(RID p_shader, List<PropertyInfo> *p_param_list) const {} + void shader_set_code(RID p_shader, const String &p_code) override {} + String shader_get_code(RID p_shader) const override { return ""; } + void shader_get_param_list(RID p_shader, List<PropertyInfo> *p_param_list) const override {} - void shader_set_default_texture_param(RID p_shader, const StringName &p_name, RID p_texture) {} - RID shader_get_default_texture_param(RID p_shader, const StringName &p_name) const { return RID(); } - virtual Variant shader_get_param_default(RID p_material, const StringName &p_param) const { return Variant(); } + void shader_set_default_texture_param(RID p_shader, const StringName &p_name, RID p_texture) override {} + RID shader_get_default_texture_param(RID p_shader, const StringName &p_name) const override { return RID(); } + Variant shader_get_param_default(RID p_material, const StringName &p_param) const override { return Variant(); } /* COMMON MATERIAL API */ - RID material_create() { return RID(); } + RID material_create() override { return RID(); } - void material_set_render_priority(RID p_material, int priority) {} - void material_set_shader(RID p_shader_material, RID p_shader) {} + void material_set_render_priority(RID p_material, int priority) override {} + void material_set_shader(RID p_shader_material, RID p_shader) override {} - void material_set_param(RID p_material, const StringName &p_param, const Variant &p_value) {} - Variant material_get_param(RID p_material, const StringName &p_param) const { return Variant(); } + void material_set_param(RID p_material, const StringName &p_param, const Variant &p_value) override {} + Variant material_get_param(RID p_material, const StringName &p_param) const override { return Variant(); } - void material_set_next_pass(RID p_material, RID p_next_material) {} + void material_set_next_pass(RID p_material, RID p_next_material) override {} - bool material_is_animated(RID p_material) { return false; } - bool material_casts_shadows(RID p_material) { return false; } - virtual void material_get_instance_shader_parameters(RID p_material, List<InstanceShaderParam> *r_parameters) {} - void material_update_dependency(RID p_material, RasterizerScene::InstanceBase *p_instance) {} + bool material_is_animated(RID p_material) override { return false; } + bool material_casts_shadows(RID p_material) override { return false; } + void material_get_instance_shader_parameters(RID p_material, List<InstanceShaderParam> *r_parameters) override {} + void material_update_dependency(RID p_material, RasterizerScene::InstanceBase *p_instance) override {} /* MESH API */ - RID mesh_create() { + RID mesh_create() override { DummyMesh *mesh = memnew(DummyMesh); ERR_FAIL_COND_V(!mesh, RID()); mesh->blend_shape_count = 0; @@ -396,10 +386,10 @@ public: return mesh_owner.make_rid(mesh); } - void mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) {} + void mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) override {} #if 0 - void mesh_add_surface(RID p_mesh, uint32_t p_format, RS::PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes = Vector<Vector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>()) { + void mesh_add_surface(RID p_mesh, uint32_t p_format, RS::PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes = Vector<Vector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>()) override { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND(!m); @@ -416,95 +406,95 @@ public: s->bone_aabbs = p_bone_aabbs; } - void mesh_set_blend_shape_count(RID p_mesh, int p_amount) { + void mesh_set_blend_shape_count(RID p_mesh, int p_amount) override { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND(!m); m->blend_shape_count = p_amount; } #endif - int mesh_get_blend_shape_count(RID p_mesh) const { + int mesh_get_blend_shape_count(RID p_mesh) const override { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND_V(!m, 0); return m->blend_shape_count; } - void mesh_set_blend_shape_mode(RID p_mesh, RS::BlendShapeMode p_mode) { + void mesh_set_blend_shape_mode(RID p_mesh, RS::BlendShapeMode p_mode) override { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND(!m); m->blend_shape_mode = p_mode; } - RS::BlendShapeMode mesh_get_blend_shape_mode(RID p_mesh) const { + RS::BlendShapeMode mesh_get_blend_shape_mode(RID p_mesh) const override { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND_V(!m, RS::BLEND_SHAPE_MODE_NORMALIZED); return m->blend_shape_mode; } - void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) {} + void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) override {} - void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material) {} - RID mesh_surface_get_material(RID p_mesh, int p_surface) const { return RID(); } + void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material) override {} + RID mesh_surface_get_material(RID p_mesh, int p_surface) const override { return RID(); } #if 0 - int mesh_surface_get_array_len(RID p_mesh, int p_surface) const { + int mesh_surface_get_array_len(RID p_mesh, int p_surface) const override { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND_V(!m, 0); return m->surfaces[p_surface].vertex_count; } - int mesh_surface_get_array_index_len(RID p_mesh, int p_surface) const { + int mesh_surface_get_array_index_len(RID p_mesh, int p_surface) const override { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND_V(!m, 0); return m->surfaces[p_surface].index_count; } - Vector<uint8_t> mesh_surface_get_array(RID p_mesh, int p_surface) const { + Vector<uint8_t> mesh_surface_get_array(RID p_mesh, int p_surface) const override { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND_V(!m, Vector<uint8_t>()); return m->surfaces[p_surface].array; } - Vector<uint8_t> mesh_surface_get_index_array(RID p_mesh, int p_surface) const { + Vector<uint8_t> mesh_surface_get_index_array(RID p_mesh, int p_surface) const override { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND_V(!m, Vector<uint8_t>()); return m->surfaces[p_surface].index_array; } - uint32_t mesh_surface_get_format(RID p_mesh, int p_surface) const { + uint32_t mesh_surface_get_format(RID p_mesh, int p_surface) const override { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND_V(!m, 0); return m->surfaces[p_surface].format; } - RS::PrimitiveType mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const { + RS::PrimitiveType mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const override { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND_V(!m, RS::PRIMITIVE_POINTS); return m->surfaces[p_surface].primitive; } - AABB mesh_surface_get_aabb(RID p_mesh, int p_surface) const { + AABB mesh_surface_get_aabb(RID p_mesh, int p_surface) const override { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND_V(!m, AABB()); return m->surfaces[p_surface].aabb; } - Vector<Vector<uint8_t> > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const { + Vector<Vector<uint8_t> > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const override { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND_V(!m, Vector<Vector<uint8_t> >()); return m->surfaces[p_surface].blend_shapes; } - Vector<AABB> mesh_surface_get_skeleton_aabb(RID p_mesh, int p_surface) const { + Vector<AABB> mesh_surface_get_skeleton_aabb(RID p_mesh, int p_surface) const override { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND_V(!m, Vector<AABB>()); return m->surfaces[p_surface].bone_aabbs; } - void mesh_remove_surface(RID p_mesh, int p_index) { + void mesh_remove_surface(RID p_mesh, int p_index) override { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND(!m); ERR_FAIL_COND(p_index >= m->surfaces.size()); @@ -513,203 +503,198 @@ public: } #endif - RS::SurfaceData mesh_get_surface(RID p_mesh, int p_surface) const { return RS::SurfaceData(); } - int mesh_get_surface_count(RID p_mesh) const { + RS::SurfaceData mesh_get_surface(RID p_mesh, int p_surface) const override { return RS::SurfaceData(); } + int mesh_get_surface_count(RID p_mesh) const override { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND_V(!m, 0); return m->surfaces.size(); } - void mesh_set_custom_aabb(RID p_mesh, const AABB &p_aabb) {} - AABB mesh_get_custom_aabb(RID p_mesh) const { return AABB(); } + void mesh_set_custom_aabb(RID p_mesh, const AABB &p_aabb) override {} + AABB mesh_get_custom_aabb(RID p_mesh) const override { return AABB(); } - AABB mesh_get_aabb(RID p_mesh, RID p_skeleton = RID()) { return AABB(); } - void mesh_clear(RID p_mesh) {} + AABB mesh_get_aabb(RID p_mesh, RID p_skeleton = RID()) override { return AABB(); } + void mesh_clear(RID p_mesh) override {} /* MULTIMESH API */ - virtual RID multimesh_create() { return RID(); } + RID multimesh_create() override { return RID(); } - virtual void multimesh_allocate(RID p_multimesh, int p_instances, RS::MultimeshTransformFormat p_transform_format, bool p_use_colors = false, bool p_use_custom_data = false) {} - int multimesh_get_instance_count(RID p_multimesh) const { return 0; } + void multimesh_allocate(RID p_multimesh, int p_instances, RS::MultimeshTransformFormat p_transform_format, bool p_use_colors = false, bool p_use_custom_data = false) override {} + int multimesh_get_instance_count(RID p_multimesh) const override { return 0; } - void multimesh_set_mesh(RID p_multimesh, RID p_mesh) {} - void multimesh_instance_set_transform(RID p_multimesh, int p_index, const Transform &p_transform) {} - void multimesh_instance_set_transform_2d(RID p_multimesh, int p_index, const Transform2D &p_transform) {} - void multimesh_instance_set_color(RID p_multimesh, int p_index, const Color &p_color) {} - void multimesh_instance_set_custom_data(RID p_multimesh, int p_index, const Color &p_color) {} + void multimesh_set_mesh(RID p_multimesh, RID p_mesh) override {} + void multimesh_instance_set_transform(RID p_multimesh, int p_index, const Transform &p_transform) override {} + void multimesh_instance_set_transform_2d(RID p_multimesh, int p_index, const Transform2D &p_transform) override {} + void multimesh_instance_set_color(RID p_multimesh, int p_index, const Color &p_color) override {} + void multimesh_instance_set_custom_data(RID p_multimesh, int p_index, const Color &p_color) override {} - RID multimesh_get_mesh(RID p_multimesh) const { return RID(); } - AABB multimesh_get_aabb(RID p_multimesh) const { return AABB(); } + RID multimesh_get_mesh(RID p_multimesh) const override { return RID(); } + AABB multimesh_get_aabb(RID p_multimesh) const override { return AABB(); } - Transform multimesh_instance_get_transform(RID p_multimesh, int p_index) const { return Transform(); } - Transform2D multimesh_instance_get_transform_2d(RID p_multimesh, int p_index) const { return Transform2D(); } - Color multimesh_instance_get_color(RID p_multimesh, int p_index) const { return Color(); } - Color multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const { return Color(); } - virtual void multimesh_set_buffer(RID p_multimesh, const Vector<float> &p_buffer) {} - virtual Vector<float> multimesh_get_buffer(RID p_multimesh) const { return Vector<float>(); } + Transform multimesh_instance_get_transform(RID p_multimesh, int p_index) const override { return Transform(); } + Transform2D multimesh_instance_get_transform_2d(RID p_multimesh, int p_index) const override { return Transform2D(); } + Color multimesh_instance_get_color(RID p_multimesh, int p_index) const override { return Color(); } + Color multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const override { return Color(); } + void multimesh_set_buffer(RID p_multimesh, const Vector<float> &p_buffer) override {} + Vector<float> multimesh_get_buffer(RID p_multimesh) const override { return Vector<float>(); } - void multimesh_set_visible_instances(RID p_multimesh, int p_visible) {} - int multimesh_get_visible_instances(RID p_multimesh) const { return 0; } + void multimesh_set_visible_instances(RID p_multimesh, int p_visible) override {} + int multimesh_get_visible_instances(RID p_multimesh) const override { return 0; } /* IMMEDIATE API */ - RID immediate_create() { return RID(); } - void immediate_begin(RID p_immediate, RS::PrimitiveType p_rimitive, RID p_texture = RID()) {} - void immediate_vertex(RID p_immediate, const Vector3 &p_vertex) {} - void immediate_normal(RID p_immediate, const Vector3 &p_normal) {} - void immediate_tangent(RID p_immediate, const Plane &p_tangent) {} - void immediate_color(RID p_immediate, const Color &p_color) {} - void immediate_uv(RID p_immediate, const Vector2 &tex_uv) {} - void immediate_uv2(RID p_immediate, const Vector2 &tex_uv) {} - void immediate_end(RID p_immediate) {} - void immediate_clear(RID p_immediate) {} - void immediate_set_material(RID p_immediate, RID p_material) {} - RID immediate_get_material(RID p_immediate) const { return RID(); } - AABB immediate_get_aabb(RID p_immediate) const { return AABB(); } + RID immediate_create() override { return RID(); } + void immediate_begin(RID p_immediate, RS::PrimitiveType p_rimitive, RID p_texture = RID()) override {} + void immediate_vertex(RID p_immediate, const Vector3 &p_vertex) override {} + void immediate_normal(RID p_immediate, const Vector3 &p_normal) override {} + void immediate_tangent(RID p_immediate, const Plane &p_tangent) override {} + void immediate_color(RID p_immediate, const Color &p_color) override {} + void immediate_uv(RID p_immediate, const Vector2 &tex_uv) override {} + void immediate_uv2(RID p_immediate, const Vector2 &tex_uv) override {} + void immediate_end(RID p_immediate) override {} + void immediate_clear(RID p_immediate) override {} + void immediate_set_material(RID p_immediate, RID p_material) override {} + RID immediate_get_material(RID p_immediate) const override { return RID(); } + AABB immediate_get_aabb(RID p_immediate) const override { return AABB(); } /* SKELETON API */ - RID skeleton_create() { return RID(); } - void skeleton_allocate(RID p_skeleton, int p_bones, bool p_2d_skeleton = false) {} - void skeleton_set_base_transform_2d(RID p_skeleton, const Transform2D &p_base_transform) {} - void skeleton_set_world_transform(RID p_skeleton, bool p_enable, const Transform &p_world_transform) {} - int skeleton_get_bone_count(RID p_skeleton) const { return 0; } - void skeleton_bone_set_transform(RID p_skeleton, int p_bone, const Transform &p_transform) {} - Transform skeleton_bone_get_transform(RID p_skeleton, int p_bone) const { return Transform(); } - void skeleton_bone_set_transform_2d(RID p_skeleton, int p_bone, const Transform2D &p_transform) {} - Transform2D skeleton_bone_get_transform_2d(RID p_skeleton, int p_bone) const { return Transform2D(); } + RID skeleton_create() override { return RID(); } + void skeleton_allocate(RID p_skeleton, int p_bones, bool p_2d_skeleton = false) override {} + void skeleton_set_base_transform_2d(RID p_skeleton, const Transform2D &p_base_transform) override {} + int skeleton_get_bone_count(RID p_skeleton) const override { return 0; } + void skeleton_bone_set_transform(RID p_skeleton, int p_bone, const Transform &p_transform) override {} + Transform skeleton_bone_get_transform(RID p_skeleton, int p_bone) const override { return Transform(); } + void skeleton_bone_set_transform_2d(RID p_skeleton, int p_bone, const Transform2D &p_transform) override {} + Transform2D skeleton_bone_get_transform_2d(RID p_skeleton, int p_bone) const override { return Transform2D(); } /* Light API */ - RID light_create(RS::LightType p_type) { return RID(); } + RID light_create(RS::LightType p_type) override { return RID(); } - RID directional_light_create() { return light_create(RS::LIGHT_DIRECTIONAL); } - RID omni_light_create() { return light_create(RS::LIGHT_OMNI); } - RID spot_light_create() { return light_create(RS::LIGHT_SPOT); } + void light_set_color(RID p_light, const Color &p_color) override {} + void light_set_param(RID p_light, RS::LightParam p_param, float p_value) override {} + void light_set_shadow(RID p_light, bool p_enabled) override {} + void light_set_shadow_color(RID p_light, const Color &p_color) override {} + void light_set_projector(RID p_light, RID p_texture) override {} + void light_set_negative(RID p_light, bool p_enable) override {} + void light_set_cull_mask(RID p_light, uint32_t p_mask) override {} + void light_set_reverse_cull_face_mode(RID p_light, bool p_enabled) override {} + void light_set_bake_mode(RID p_light, RS::LightBakeMode p_bake_mode) override {} + void light_set_max_sdfgi_cascade(RID p_light, uint32_t p_cascade) override {} - void light_set_color(RID p_light, const Color &p_color) {} - void light_set_param(RID p_light, RS::LightParam p_param, float p_value) {} - void light_set_shadow(RID p_light, bool p_enabled) {} - void light_set_shadow_color(RID p_light, const Color &p_color) {} - void light_set_projector(RID p_light, RID p_texture) {} - void light_set_negative(RID p_light, bool p_enable) {} - void light_set_cull_mask(RID p_light, uint32_t p_mask) {} - void light_set_reverse_cull_face_mode(RID p_light, bool p_enabled) {} - void light_set_bake_mode(RID p_light, RS::LightBakeMode p_bake_mode) {} - void light_set_max_sdfgi_cascade(RID p_light, uint32_t p_cascade) {} + void light_omni_set_shadow_mode(RID p_light, RS::LightOmniShadowMode p_mode) override {} - void light_omni_set_shadow_mode(RID p_light, RS::LightOmniShadowMode p_mode) {} + void light_directional_set_shadow_mode(RID p_light, RS::LightDirectionalShadowMode p_mode) override {} + void light_directional_set_blend_splits(RID p_light, bool p_enable) override {} + bool light_directional_get_blend_splits(RID p_light) const override { return false; } + void light_directional_set_shadow_depth_range_mode(RID p_light, RS::LightDirectionalShadowDepthRangeMode p_range_mode) override {} + RS::LightDirectionalShadowDepthRangeMode light_directional_get_shadow_depth_range_mode(RID p_light) const override { return RS::LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE; } - void light_directional_set_shadow_mode(RID p_light, RS::LightDirectionalShadowMode p_mode) {} - void light_directional_set_blend_splits(RID p_light, bool p_enable) {} - bool light_directional_get_blend_splits(RID p_light) const { return false; } - void light_directional_set_shadow_depth_range_mode(RID p_light, RS::LightDirectionalShadowDepthRangeMode p_range_mode) {} - RS::LightDirectionalShadowDepthRangeMode light_directional_get_shadow_depth_range_mode(RID p_light) const { return RS::LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE; } + RS::LightDirectionalShadowMode light_directional_get_shadow_mode(RID p_light) override { return RS::LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL; } + RS::LightOmniShadowMode light_omni_get_shadow_mode(RID p_light) override { return RS::LIGHT_OMNI_SHADOW_DUAL_PARABOLOID; } - RS::LightDirectionalShadowMode light_directional_get_shadow_mode(RID p_light) { return RS::LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL; } - RS::LightOmniShadowMode light_omni_get_shadow_mode(RID p_light) { return RS::LIGHT_OMNI_SHADOW_DUAL_PARABOLOID; } + bool light_has_shadow(RID p_light) const override { return false; } - bool light_has_shadow(RID p_light) const { return false; } - - RS::LightType light_get_type(RID p_light) const { return RS::LIGHT_OMNI; } - AABB light_get_aabb(RID p_light) const { return AABB(); } - float light_get_param(RID p_light, RS::LightParam p_param) { return 0.0; } - Color light_get_color(RID p_light) { return Color(); } - virtual RS::LightBakeMode light_get_bake_mode(RID p_light) { return RS::LIGHT_BAKE_DISABLED; } - virtual uint32_t light_get_max_sdfgi_cascade(RID p_light) { return 0; } - uint64_t light_get_version(RID p_light) const { return 0; } + RS::LightType light_get_type(RID p_light) const override { return RS::LIGHT_OMNI; } + AABB light_get_aabb(RID p_light) const override { return AABB(); } + float light_get_param(RID p_light, RS::LightParam p_param) override { return 0.0; } + Color light_get_color(RID p_light) override { return Color(); } + RS::LightBakeMode light_get_bake_mode(RID p_light) override { return RS::LIGHT_BAKE_DISABLED; } + uint32_t light_get_max_sdfgi_cascade(RID p_light) override { return 0; } + uint64_t light_get_version(RID p_light) const override { return 0; } /* PROBE API */ - RID reflection_probe_create() { return RID(); } - - void reflection_probe_set_update_mode(RID p_probe, RS::ReflectionProbeUpdateMode p_mode) {} - void reflection_probe_set_intensity(RID p_probe, float p_intensity) {} - void reflection_probe_set_ambient_mode(RID p_probe, RS::ReflectionProbeAmbientMode p_mode) {} - void reflection_probe_set_ambient_color(RID p_probe, const Color &p_color) {} - void reflection_probe_set_ambient_energy(RID p_probe, float p_energy) {} - void reflection_probe_set_max_distance(RID p_probe, float p_distance) {} - void reflection_probe_set_extents(RID p_probe, const Vector3 &p_extents) {} - void reflection_probe_set_origin_offset(RID p_probe, const Vector3 &p_offset) {} - void reflection_probe_set_as_interior(RID p_probe, bool p_enable) {} - void reflection_probe_set_enable_box_projection(RID p_probe, bool p_enable) {} - void reflection_probe_set_enable_shadows(RID p_probe, bool p_enable) {} - void reflection_probe_set_cull_mask(RID p_probe, uint32_t p_layers) {} - void reflection_probe_set_resolution(RID p_probe, int p_resolution) {} - - AABB reflection_probe_get_aabb(RID p_probe) const { return AABB(); } - RS::ReflectionProbeUpdateMode reflection_probe_get_update_mode(RID p_probe) const { return RenderingServer::REFLECTION_PROBE_UPDATE_ONCE; } - uint32_t reflection_probe_get_cull_mask(RID p_probe) const { return 0; } - Vector3 reflection_probe_get_extents(RID p_probe) const { return Vector3(); } - Vector3 reflection_probe_get_origin_offset(RID p_probe) const { return Vector3(); } - float reflection_probe_get_origin_max_distance(RID p_probe) const { return 0.0; } - bool reflection_probe_renders_shadows(RID p_probe) const { return false; } - - virtual void base_update_dependency(RID p_base, RasterizerScene::InstanceBase *p_instance) {} - virtual void skeleton_update_dependency(RID p_base, RasterizerScene::InstanceBase *p_instance) {} + RID reflection_probe_create() override { return RID(); } + + void reflection_probe_set_update_mode(RID p_probe, RS::ReflectionProbeUpdateMode p_mode) override {} + void reflection_probe_set_intensity(RID p_probe, float p_intensity) override {} + void reflection_probe_set_ambient_mode(RID p_probe, RS::ReflectionProbeAmbientMode p_mode) override {} + void reflection_probe_set_ambient_color(RID p_probe, const Color &p_color) override {} + void reflection_probe_set_ambient_energy(RID p_probe, float p_energy) override {} + void reflection_probe_set_max_distance(RID p_probe, float p_distance) override {} + void reflection_probe_set_extents(RID p_probe, const Vector3 &p_extents) override {} + void reflection_probe_set_origin_offset(RID p_probe, const Vector3 &p_offset) override {} + void reflection_probe_set_as_interior(RID p_probe, bool p_enable) override {} + void reflection_probe_set_enable_box_projection(RID p_probe, bool p_enable) override {} + void reflection_probe_set_enable_shadows(RID p_probe, bool p_enable) override {} + void reflection_probe_set_cull_mask(RID p_probe, uint32_t p_layers) override {} + void reflection_probe_set_resolution(RID p_probe, int p_resolution) override {} + + AABB reflection_probe_get_aabb(RID p_probe) const override { return AABB(); } + RS::ReflectionProbeUpdateMode reflection_probe_get_update_mode(RID p_probe) const override { return RenderingServer::REFLECTION_PROBE_UPDATE_ONCE; } + uint32_t reflection_probe_get_cull_mask(RID p_probe) const override { return 0; } + Vector3 reflection_probe_get_extents(RID p_probe) const override { return Vector3(); } + Vector3 reflection_probe_get_origin_offset(RID p_probe) const override { return Vector3(); } + float reflection_probe_get_origin_max_distance(RID p_probe) const override { return 0.0; } + bool reflection_probe_renders_shadows(RID p_probe) const override { return false; } + + void base_update_dependency(RID p_base, RasterizerScene::InstanceBase *p_instance) override {} + void skeleton_update_dependency(RID p_base, RasterizerScene::InstanceBase *p_instance) override {} /* DECAL API */ - virtual RID decal_create() { return RID(); } - virtual void decal_set_extents(RID p_decal, const Vector3 &p_extents) {} - virtual void decal_set_texture(RID p_decal, RS::DecalTexture p_type, RID p_texture) {} - virtual void decal_set_emission_energy(RID p_decal, float p_energy) {} - virtual void decal_set_albedo_mix(RID p_decal, float p_mix) {} - virtual void decal_set_modulate(RID p_decal, const Color &p_modulate) {} - virtual void decal_set_cull_mask(RID p_decal, uint32_t p_layers) {} - virtual void decal_set_distance_fade(RID p_decal, bool p_enabled, float p_begin, float p_length) {} - virtual void decal_set_fade(RID p_decal, float p_above, float p_below) {} - virtual void decal_set_normal_fade(RID p_decal, float p_fade) {} + RID decal_create() override { return RID(); } + void decal_set_extents(RID p_decal, const Vector3 &p_extents) override {} + void decal_set_texture(RID p_decal, RS::DecalTexture p_type, RID p_texture) override {} + void decal_set_emission_energy(RID p_decal, float p_energy) override {} + void decal_set_albedo_mix(RID p_decal, float p_mix) override {} + void decal_set_modulate(RID p_decal, const Color &p_modulate) override {} + void decal_set_cull_mask(RID p_decal, uint32_t p_layers) override {} + void decal_set_distance_fade(RID p_decal, bool p_enabled, float p_begin, float p_length) override {} + void decal_set_fade(RID p_decal, float p_above, float p_below) override {} + void decal_set_normal_fade(RID p_decal, float p_fade) override {} - virtual AABB decal_get_aabb(RID p_decal) const { return AABB(); } + AABB decal_get_aabb(RID p_decal) const override { return AABB(); } /* GI PROBE API */ - RID gi_probe_create() { return RID(); } + RID gi_probe_create() override { return RID(); } - virtual void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) {} + void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) override {} - virtual AABB gi_probe_get_bounds(RID p_gi_probe) const { return AABB(); } - virtual Vector3i gi_probe_get_octree_size(RID p_gi_probe) const { return Vector3i(); } - virtual Vector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const { return Vector<uint8_t>(); } - virtual Vector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const { return Vector<uint8_t>(); } - virtual Vector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const { return Vector<uint8_t>(); } + AABB gi_probe_get_bounds(RID p_gi_probe) const override { return AABB(); } + Vector3i gi_probe_get_octree_size(RID p_gi_probe) const override { return Vector3i(); } + Vector<uint8_t> gi_probe_get_octree_cells(RID p_gi_probe) const override { return Vector<uint8_t>(); } + Vector<uint8_t> gi_probe_get_data_cells(RID p_gi_probe) const override { return Vector<uint8_t>(); } + Vector<uint8_t> gi_probe_get_distance_field(RID p_gi_probe) const override { return Vector<uint8_t>(); } - virtual Vector<int> gi_probe_get_level_counts(RID p_gi_probe) const { return Vector<int>(); } - virtual Transform gi_probe_get_to_cell_xform(RID p_gi_probe) const { return Transform(); } + Vector<int> gi_probe_get_level_counts(RID p_gi_probe) const override { return Vector<int>(); } + Transform gi_probe_get_to_cell_xform(RID p_gi_probe) const override { return Transform(); } - virtual void gi_probe_set_dynamic_range(RID p_gi_probe, float p_range) {} - virtual float gi_probe_get_dynamic_range(RID p_gi_probe) const { return 0; } + void gi_probe_set_dynamic_range(RID p_gi_probe, float p_range) override {} + float gi_probe_get_dynamic_range(RID p_gi_probe) const override { return 0; } - virtual void gi_probe_set_propagation(RID p_gi_probe, float p_range) {} - virtual float gi_probe_get_propagation(RID p_gi_probe) const { return 0; } + void gi_probe_set_propagation(RID p_gi_probe, float p_range) override {} + float gi_probe_get_propagation(RID p_gi_probe) const override { return 0; } - void gi_probe_set_energy(RID p_gi_probe, float p_range) {} - float gi_probe_get_energy(RID p_gi_probe) const { return 0.0; } + void gi_probe_set_energy(RID p_gi_probe, float p_range) override {} + float gi_probe_get_energy(RID p_gi_probe) const override { return 0.0; } - virtual void gi_probe_set_ao(RID p_gi_probe, float p_ao) {} - virtual float gi_probe_get_ao(RID p_gi_probe) const { return 0; } + void gi_probe_set_ao(RID p_gi_probe, float p_ao) override {} + float gi_probe_get_ao(RID p_gi_probe) const override { return 0; } - virtual void gi_probe_set_ao_size(RID p_gi_probe, float p_strength) {} - virtual float gi_probe_get_ao_size(RID p_gi_probe) const { return 0; } + void gi_probe_set_ao_size(RID p_gi_probe, float p_strength) override {} + float gi_probe_get_ao_size(RID p_gi_probe) const override { return 0; } - void gi_probe_set_bias(RID p_gi_probe, float p_range) {} - float gi_probe_get_bias(RID p_gi_probe) const { return 0.0; } + void gi_probe_set_bias(RID p_gi_probe, float p_range) override {} + float gi_probe_get_bias(RID p_gi_probe) const override { return 0.0; } - void gi_probe_set_normal_bias(RID p_gi_probe, float p_range) {} - float gi_probe_get_normal_bias(RID p_gi_probe) const { return 0.0; } + void gi_probe_set_normal_bias(RID p_gi_probe, float p_range) override {} + float gi_probe_get_normal_bias(RID p_gi_probe) const override { return 0.0; } - void gi_probe_set_interior(RID p_gi_probe, bool p_enable) {} - bool gi_probe_is_interior(RID p_gi_probe) const { return false; } + void gi_probe_set_interior(RID p_gi_probe, bool p_enable) override {} + bool gi_probe_is_interior(RID p_gi_probe) const override { return false; } - virtual void gi_probe_set_use_two_bounces(RID p_gi_probe, bool p_enable) {} - virtual bool gi_probe_is_using_two_bounces(RID p_gi_probe) const { return false; } + void gi_probe_set_use_two_bounces(RID p_gi_probe, bool p_enable) override {} + bool gi_probe_is_using_two_bounces(RID p_gi_probe) const override { return false; } - virtual void gi_probe_set_anisotropy_strength(RID p_gi_probe, float p_strength) {} - virtual float gi_probe_get_anisotropy_strength(RID p_gi_probe) const { return 0; } + void gi_probe_set_anisotropy_strength(RID p_gi_probe, float p_strength) override {} + float gi_probe_get_anisotropy_strength(RID p_gi_probe) const override { return 0; } - uint32_t gi_probe_get_version(RID p_gi_probe) { return 0; } + uint32_t gi_probe_get_version(RID p_gi_probe) override { return 0; } /* LIGHTMAP CAPTURE */ #if 0 @@ -717,19 +702,19 @@ public: SelfList<RasterizerScene::InstanceBase>::List instance_list; - _FORCE_INLINE_ void instance_change_notify(bool p_aabb = true, bool p_materials = true) { + _FORCE_INLINE_ void instance_change_notify(bool p_aabb = true, bool p_materials = true) override { SelfList<RasterizerScene::InstanceBase> *instances = instance_list.first(); - while (instances) { + while (instances) override { //instances->self()->base_changed(p_aabb, p_materials); instances = instances->next(); } } - _FORCE_INLINE_ void instance_remove_deps() { + _FORCE_INLINE_ void instance_remove_deps() override { SelfList<RasterizerScene::InstanceBase> *instances = instance_list.first(); - while (instances) { + while (instances) override { SelfList<RasterizerScene::InstanceBase> *next = instances->next(); //instances->self()->base_removed(); @@ -737,8 +722,8 @@ public: } } - Instantiable() {} - virtual ~Instantiable() { + Instantiable() override {} + ~Instantiable() override { } }; @@ -749,126 +734,129 @@ public: Transform cell_xform; int cell_subdiv; float energy; - LightmapCapture() { + LightmapCapture() override { energy = 1.0; cell_subdiv = 1; } }; mutable RID_PtrOwner<LightmapCapture> lightmap_capture_data_owner; - void lightmap_capture_set_bounds(RID p_capture, const AABB &p_bounds) {} - AABB lightmap_capture_get_bounds(RID p_capture) const { return AABB(); } - void lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree) {} - RID lightmap_capture_create() { + void lightmap_capture_set_bounds(RID p_capture, const AABB &p_bounds) override {} + AABB lightmap_capture_get_bounds(RID p_capture) const override { return AABB(); } + void lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree) override {} + RID lightmap_capture_create() override { LightmapCapture *capture = memnew(LightmapCapture); return lightmap_capture_data_owner.make_rid(capture); } - Vector<uint8_t> lightmap_capture_get_octree(RID p_capture) const { + Vector<uint8_t> lightmap_capture_get_octree(RID p_capture) const override { const LightmapCapture *capture = lightmap_capture_data_owner.getornull(p_capture); ERR_FAIL_COND_V(!capture, Vector<uint8_t>()); return Vector<uint8_t>(); } - void lightmap_capture_set_octree_cell_transform(RID p_capture, const Transform &p_xform) {} - Transform lightmap_capture_get_octree_cell_transform(RID p_capture) const { return Transform(); } - void lightmap_capture_set_octree_cell_subdiv(RID p_capture, int p_subdiv) {} - int lightmap_capture_get_octree_cell_subdiv(RID p_capture) const { return 0; } - void lightmap_capture_set_energy(RID p_capture, float p_energy) {} - float lightmap_capture_get_energy(RID p_capture) const { return 0.0; } - const Vector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const { + void lightmap_capture_set_octree_cell_transform(RID p_capture, const Transform &p_xform) override {} + Transform lightmap_capture_get_octree_cell_transform(RID p_capture) const override { return Transform(); } + void lightmap_capture_set_octree_cell_subdiv(RID p_capture, int p_subdiv) override {} + int lightmap_capture_get_octree_cell_subdiv(RID p_capture) const override { return 0; } + void lightmap_capture_set_energy(RID p_capture, float p_energy) override {} + float lightmap_capture_get_energy(RID p_capture) const override { return 0.0; } + const Vector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const override { const LightmapCapture *capture = lightmap_capture_data_owner.getornull(p_capture); ERR_FAIL_COND_V(!capture, nullptr); return &capture->octree; } #endif - virtual RID lightmap_create() { return RID(); } - - virtual void lightmap_set_textures(RID p_lightmap, RID p_light, bool p_uses_spherical_haromics) {} - virtual void lightmap_set_probe_bounds(RID p_lightmap, const AABB &p_bounds) {} - virtual void lightmap_set_probe_interior(RID p_lightmap, bool p_interior) {} - virtual void lightmap_set_probe_capture_data(RID p_lightmap, const PackedVector3Array &p_points, const PackedColorArray &p_point_sh, const PackedInt32Array &p_tetrahedra, const PackedInt32Array &p_bsp_tree) {} - virtual PackedVector3Array lightmap_get_probe_capture_points(RID p_lightmap) const { return PackedVector3Array(); } - virtual PackedColorArray lightmap_get_probe_capture_sh(RID p_lightmap) const { return PackedColorArray(); } - virtual PackedInt32Array lightmap_get_probe_capture_tetrahedra(RID p_lightmap) const { return PackedInt32Array(); } - virtual PackedInt32Array lightmap_get_probe_capture_bsp_tree(RID p_lightmap) const { return PackedInt32Array(); } - virtual AABB lightmap_get_aabb(RID p_lightmap) const { return AABB(); } - virtual void lightmap_tap_sh_light(RID p_lightmap, const Vector3 &p_point, Color *r_sh) {} - virtual bool lightmap_is_interior(RID p_lightmap) const { return false; } - virtual void lightmap_set_probe_capture_update_speed(float p_speed) {} - virtual float lightmap_get_probe_capture_update_speed() const { return 0; } + RID lightmap_create() override { return RID(); } + + void lightmap_set_textures(RID p_lightmap, RID p_light, bool p_uses_spherical_haromics) override {} + void lightmap_set_probe_bounds(RID p_lightmap, const AABB &p_bounds) override {} + void lightmap_set_probe_interior(RID p_lightmap, bool p_interior) override {} + void lightmap_set_probe_capture_data(RID p_lightmap, const PackedVector3Array &p_points, const PackedColorArray &p_point_sh, const PackedInt32Array &p_tetrahedra, const PackedInt32Array &p_bsp_tree) override {} + PackedVector3Array lightmap_get_probe_capture_points(RID p_lightmap) const override { return PackedVector3Array(); } + PackedColorArray lightmap_get_probe_capture_sh(RID p_lightmap) const override { return PackedColorArray(); } + PackedInt32Array lightmap_get_probe_capture_tetrahedra(RID p_lightmap) const override { return PackedInt32Array(); } + PackedInt32Array lightmap_get_probe_capture_bsp_tree(RID p_lightmap) const override { return PackedInt32Array(); } + AABB lightmap_get_aabb(RID p_lightmap) const override { return AABB(); } + void lightmap_tap_sh_light(RID p_lightmap, const Vector3 &p_point, Color *r_sh) override {} + bool lightmap_is_interior(RID p_lightmap) const override { return false; } + void lightmap_set_probe_capture_update_speed(float p_speed) override {} + float lightmap_get_probe_capture_update_speed() const override { return 0; } /* PARTICLES */ - RID particles_create() { return RID(); } - - void particles_set_emitting(RID p_particles, bool p_emitting) {} - void particles_set_amount(RID p_particles, int p_amount) {} - void particles_set_lifetime(RID p_particles, float p_lifetime) {} - void particles_set_one_shot(RID p_particles, bool p_one_shot) {} - void particles_set_pre_process_time(RID p_particles, float p_time) {} - void particles_set_explosiveness_ratio(RID p_particles, float p_ratio) {} - void particles_set_randomness_ratio(RID p_particles, float p_ratio) {} - void particles_set_custom_aabb(RID p_particles, const AABB &p_aabb) {} - void particles_set_speed_scale(RID p_particles, float p_scale) {} - void particles_set_use_local_coordinates(RID p_particles, bool p_enable) {} - void particles_set_process_material(RID p_particles, RID p_material) {} - void particles_set_fixed_fps(RID p_particles, int p_fps) {} - void particles_set_fractional_delta(RID p_particles, bool p_enable) {} - void particles_restart(RID p_particles) {} - - void particles_set_draw_order(RID p_particles, RS::ParticlesDrawOrder p_order) {} - - void particles_set_draw_passes(RID p_particles, int p_count) {} - void particles_set_draw_pass_mesh(RID p_particles, int p_pass, RID p_mesh) {} - - void particles_request_process(RID p_particles) {} - AABB particles_get_current_aabb(RID p_particles) { return AABB(); } - AABB particles_get_aabb(RID p_particles) const { return AABB(); } - - void particles_set_emission_transform(RID p_particles, const Transform &p_transform) {} - - bool particles_get_emitting(RID p_particles) { return false; } - int particles_get_draw_passes(RID p_particles) const { return 0; } - RID particles_get_draw_pass_mesh(RID p_particles, int p_pass) const { return RID(); } + RID particles_create() override { return RID(); } + + void particles_emit(RID p_particles, const Transform &p_transform, const Vector3 &p_velocity, const Color &p_color, const Color &p_custom, uint32_t p_emit_flags) override {} + void particles_set_emitting(RID p_particles, bool p_emitting) override {} + void particles_set_amount(RID p_particles, int p_amount) override {} + void particles_set_lifetime(RID p_particles, float p_lifetime) override {} + void particles_set_one_shot(RID p_particles, bool p_one_shot) override {} + void particles_set_pre_process_time(RID p_particles, float p_time) override {} + void particles_set_explosiveness_ratio(RID p_particles, float p_ratio) override {} + void particles_set_randomness_ratio(RID p_particles, float p_ratio) override {} + void particles_set_custom_aabb(RID p_particles, const AABB &p_aabb) override {} + void particles_set_speed_scale(RID p_particles, float p_scale) override {} + void particles_set_use_local_coordinates(RID p_particles, bool p_enable) override {} + void particles_set_process_material(RID p_particles, RID p_material) override {} + void particles_set_fixed_fps(RID p_particles, int p_fps) override {} + void particles_set_fractional_delta(RID p_particles, bool p_enable) override {} + void particles_set_subemitter(RID p_particles, RID p_subemitter_particles) override {} + void particles_set_view_axis(RID p_particles, const Vector3 &p_axis) override {} + void particles_restart(RID p_particles) override {} + + void particles_set_draw_order(RID p_particles, RS::ParticlesDrawOrder p_order) override {} + + void particles_set_draw_passes(RID p_particles, int p_count) override {} + void particles_set_draw_pass_mesh(RID p_particles, int p_pass, RID p_mesh) override {} + + void particles_request_process(RID p_particles) override {} + AABB particles_get_current_aabb(RID p_particles) override { return AABB(); } + AABB particles_get_aabb(RID p_particles) const override { return AABB(); } + + void particles_set_emission_transform(RID p_particles, const Transform &p_transform) override {} + + bool particles_get_emitting(RID p_particles) override { return false; } + int particles_get_draw_passes(RID p_particles) const override { return 0; } + RID particles_get_draw_pass_mesh(RID p_particles, int p_pass) const override { return RID(); } /* GLOBAL VARIABLES */ - virtual void global_variable_add(const StringName &p_name, RS::GlobalVariableType p_type, const Variant &p_value) {} - virtual void global_variable_remove(const StringName &p_name) {} - virtual Vector<StringName> global_variable_get_list() const { return Vector<StringName>(); } + void global_variable_add(const StringName &p_name, RS::GlobalVariableType p_type, const Variant &p_value) override {} + void global_variable_remove(const StringName &p_name) override {} + Vector<StringName> global_variable_get_list() const override { return Vector<StringName>(); } - virtual void global_variable_set(const StringName &p_name, const Variant &p_value) {} - virtual void global_variable_set_override(const StringName &p_name, const Variant &p_value) {} - virtual Variant global_variable_get(const StringName &p_name) const { return Variant(); } - virtual RS::GlobalVariableType global_variable_get_type(const StringName &p_name) const { return RS::GLOBAL_VAR_TYPE_MAX; } + void global_variable_set(const StringName &p_name, const Variant &p_value) override {} + void global_variable_set_override(const StringName &p_name, const Variant &p_value) override {} + Variant global_variable_get(const StringName &p_name) const override { return Variant(); } + RS::GlobalVariableType global_variable_get_type(const StringName &p_name) const override { return RS::GLOBAL_VAR_TYPE_MAX; } - virtual void global_variables_load_settings(bool p_load_textures = true) {} - virtual void global_variables_clear() {} + void global_variables_load_settings(bool p_load_textures = true) override {} + void global_variables_clear() override {} - virtual int32_t global_variables_instance_allocate(RID p_instance) { return 0; } - virtual void global_variables_instance_free(RID p_instance) {} - virtual void global_variables_instance_update(RID p_instance, int p_index, const Variant &p_value) {} + int32_t global_variables_instance_allocate(RID p_instance) override { return 0; } + void global_variables_instance_free(RID p_instance) override {} + void global_variables_instance_update(RID p_instance, int p_index, const Variant &p_value) override {} - virtual bool particles_is_inactive(RID p_particles) const { return false; } + bool particles_is_inactive(RID p_particles) const override { return false; } /* RENDER TARGET */ - RID render_target_create() { return RID(); } - void render_target_set_position(RID p_render_target, int p_x, int p_y) {} - void render_target_set_size(RID p_render_target, int p_width, int p_height) {} - RID render_target_get_texture(RID p_render_target) { return RID(); } - void render_target_set_external_texture(RID p_render_target, unsigned int p_texture_id) {} - void render_target_set_flag(RID p_render_target, RenderTargetFlags p_flag, bool p_value) {} - bool render_target_was_used(RID p_render_target) { return false; } - void render_target_set_as_unused(RID p_render_target) {} - - virtual void render_target_request_clear(RID p_render_target, const Color &p_clear_color) {} - virtual bool render_target_is_clear_requested(RID p_render_target) { return false; } - virtual Color render_target_get_clear_request_color(RID p_render_target) { return Color(); } - virtual void render_target_disable_clear_request(RID p_render_target) {} - virtual void render_target_do_clear_request(RID p_render_target) {} - - RS::InstanceType get_base_type(RID p_rid) const { + RID render_target_create() override { return RID(); } + void render_target_set_position(RID p_render_target, int p_x, int p_y) override {} + void render_target_set_size(RID p_render_target, int p_width, int p_height) override {} + RID render_target_get_texture(RID p_render_target) override { return RID(); } + void render_target_set_external_texture(RID p_render_target, unsigned int p_texture_id) override {} + void render_target_set_flag(RID p_render_target, RenderTargetFlags p_flag, bool p_value) override {} + bool render_target_was_used(RID p_render_target) override { return false; } + void render_target_set_as_unused(RID p_render_target) override {} + + void render_target_request_clear(RID p_render_target, const Color &p_clear_color) override {} + bool render_target_is_clear_requested(RID p_render_target) override { return false; } + Color render_target_get_clear_request_color(RID p_render_target) override { return Color(); } + void render_target_disable_clear_request(RID p_render_target) override {} + void render_target_do_clear_request(RID p_render_target) override {} + + RS::InstanceType get_base_type(RID p_rid) const override { if (mesh_owner.owns(p_rid)) { return RS::INSTANCE_MESH; } @@ -876,7 +864,7 @@ public: return RS::INSTANCE_NONE; } - bool free(RID p_rid) { + bool free(RID p_rid) override { if (texture_owner.owns(p_rid)) { // delete the texture DummyTexture *texture = texture_owner.getornull(p_rid); @@ -893,29 +881,29 @@ public: return true; } - bool has_os_feature(const String &p_feature) const { return false; } + bool has_os_feature(const String &p_feature) const override { return false; } - void update_dirty_resources() {} + void update_dirty_resources() override {} - void set_debug_generate_wireframes(bool p_generate) {} + void set_debug_generate_wireframes(bool p_generate) override {} - void render_info_begin_capture() {} - void render_info_end_capture() {} - int get_captured_render_info(RS::RenderInfo p_info) { return 0; } + void render_info_begin_capture() override {} + void render_info_end_capture() override {} + int get_captured_render_info(RS::RenderInfo p_info) override { return 0; } - int get_render_info(RS::RenderInfo p_info) { return 0; } - String get_video_adapter_name() const { return String(); } - String get_video_adapter_vendor() const { return String(); } + int get_render_info(RS::RenderInfo p_info) override { return 0; } + String get_video_adapter_name() const override { return String(); } + String get_video_adapter_vendor() const override { return String(); } static RasterizerStorage *base_singleton; - virtual void capture_timestamps_begin() {} - virtual void capture_timestamp(const String &p_name) {} - virtual uint32_t get_captured_timestamps_count() const { return 0; } - virtual uint64_t get_captured_timestamps_frame() const { return 0; } - virtual uint64_t get_captured_timestamp_gpu_time(uint32_t p_index) const { return 0; } - virtual uint64_t get_captured_timestamp_cpu_time(uint32_t p_index) const { return 0; } - virtual String get_captured_timestamp_name(uint32_t p_index) const { return String(); } + void capture_timestamps_begin() override {} + void capture_timestamp(const String &p_name) override {} + uint32_t get_captured_timestamps_count() const override { return 0; } + uint64_t get_captured_timestamps_frame() const override { return 0; } + uint64_t get_captured_timestamp_gpu_time(uint32_t p_index) const override { return 0; } + uint64_t get_captured_timestamp_cpu_time(uint32_t p_index) const override { return 0; } + String get_captured_timestamp_name(uint32_t p_index) const override { return String(); } RasterizerStorageDummy() {} ~RasterizerStorageDummy() {} @@ -923,28 +911,28 @@ public: class RasterizerCanvasDummy : public RasterizerCanvas { public: - virtual TextureBindingID request_texture_binding(RID p_texture, RID p_normalmap, RID p_specular, RS::CanvasItemTextureFilter p_filter, RS::CanvasItemTextureRepeat p_repeat, RID p_multimesh) { return 0; } - virtual void free_texture_binding(TextureBindingID p_binding) {} + TextureBindingID request_texture_binding(RID p_texture, RID p_normalmap, RID p_specular, RS::CanvasItemTextureFilter p_filter, RS::CanvasItemTextureRepeat p_repeat, RID p_multimesh) override { return 0; } + void free_texture_binding(TextureBindingID p_binding) override {} - virtual PolygonID request_polygon(const Vector<int> &p_indices, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), const Vector<int> &p_bones = Vector<int>(), const Vector<float> &p_weights = Vector<float>()) { return 0; } - virtual void free_polygon(PolygonID p_polygon) {} + PolygonID request_polygon(const Vector<int> &p_indices, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), const Vector<int> &p_bones = Vector<int>(), const Vector<float> &p_weights = Vector<float>()) override { return 0; } + void free_polygon(PolygonID p_polygon) override {} - virtual void canvas_render_items(RID p_to_render_target, Item *p_item_list, const Color &p_modulate, Light *p_light_list, const Transform2D &p_canvas_transform) {} - virtual void canvas_debug_viewport_shadows(Light *p_lights_with_shadow) {} + void canvas_render_items(RID p_to_render_target, Item *p_item_list, const Color &p_modulate, Light *p_light_list, const Transform2D &p_canvas_transform) override {} + void canvas_debug_viewport_shadows(Light *p_lights_with_shadow) override {} - virtual RID light_create() { return RID(); } - virtual void light_set_texture(RID p_rid, RID p_texture) {} - virtual void light_set_use_shadow(RID p_rid, bool p_enable, int p_resolution) {} - virtual void light_update_shadow(RID p_rid, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, LightOccluderInstance *p_occluders) {} + RID light_create() override { return RID(); } + void light_set_texture(RID p_rid, RID p_texture) override {} + void light_set_use_shadow(RID p_rid, bool p_enable, int p_resolution) override {} + void light_update_shadow(RID p_rid, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, LightOccluderInstance *p_occluders) override {} - virtual RID occluder_polygon_create() { return RID(); } - virtual void occluder_polygon_set_shape_as_lines(RID p_occluder, const Vector<Vector2> &p_lines) {} - virtual void occluder_polygon_set_cull_mode(RID p_occluder, RS::CanvasOccluderPolygonCullMode p_mode) {} + RID occluder_polygon_create() override { return RID(); } + void occluder_polygon_set_shape_as_lines(RID p_occluder, const Vector<Vector2> &p_lines) override {} + void occluder_polygon_set_cull_mode(RID p_occluder, RS::CanvasOccluderPolygonCullMode p_mode) override {} - void draw_window_margins(int *p_margins, RID *p_margin_textures) {} + void draw_window_margins(int *p_margins, RID *p_margin_textures) override {} - virtual bool free(RID p_rid) { return true; } - virtual void update() {} + bool free(RID p_rid) override { return true; } + void update() override {} RasterizerCanvasDummy() {} ~RasterizerCanvasDummy() {} @@ -961,32 +949,28 @@ protected: RasterizerSceneDummy scene; public: - RasterizerStorage *get_storage() { return &storage; } - RasterizerCanvas *get_canvas() { return &canvas; } - RasterizerScene *get_scene() { return &scene; } + RasterizerStorage *get_storage() override { return &storage; } + RasterizerCanvas *get_canvas() override { return &canvas; } + RasterizerScene *get_scene() override { return &scene; } - void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale, bool p_use_filter = true) {} + void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale, bool p_use_filter = true) override {} - void initialize() {} - void begin_frame(double frame_step) { + void initialize() override {} + void begin_frame(double frame_step) override { frame++; delta = frame_step; } - virtual void prepare_for_blitting_render_targets() {} - virtual void blit_render_targets_to_screen(int p_screen, const BlitToScreen *p_render_targets, int p_amount) {} + void prepare_for_blitting_render_targets() override {} + void blit_render_targets_to_screen(int p_screen, const BlitToScreen *p_render_targets, int p_amount) override {} - void end_frame(bool p_swap_buffers) { + void end_frame(bool p_swap_buffers) override { if (p_swap_buffers) { DisplayServer::get_singleton()->swap_buffers(); } } - void finalize() {} - - static Error is_viable() { - return OK; - } + void finalize() override {} static Rasterizer *_create_current() { return memnew(RasterizerDummy); @@ -996,9 +980,9 @@ public: _create_func = _create_current; } - virtual bool is_low_end() const { return true; } - virtual uint64_t get_frame_number() const { return frame; } - virtual float get_frame_delta_time() const { return delta; } + bool is_low_end() const override { return true; } + uint64_t get_frame_number() const override { return frame; } + float get_frame_delta_time() const override { return delta; } RasterizerDummy() {} ~RasterizerDummy() {} diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp index 325a88b573..5b99a2f53f 100644 --- a/drivers/unix/dir_access_unix.cpp +++ b/drivers/unix/dir_access_unix.cpp @@ -152,7 +152,7 @@ String DirAccessUnix::get_next() { _cisdir = (entry->d_type == DT_DIR); } - _cishidden = (fname != "." && fname != ".." && fname.begins_with(".")); + _cishidden = is_hidden(fname); return fname; } @@ -400,6 +400,10 @@ String DirAccessUnix::get_filesystem_type() const { return ""; //TODO this should be implemented } +bool DirAccessUnix::is_hidden(const String &p_name) { + return p_name != "." && p_name != ".." && p_name.begins_with("."); +} + DirAccessUnix::DirAccessUnix() { dir_stream = nullptr; _cisdir = false; diff --git a/drivers/unix/dir_access_unix.h b/drivers/unix/dir_access_unix.h index b897efcafc..90f98d4705 100644 --- a/drivers/unix/dir_access_unix.h +++ b/drivers/unix/dir_access_unix.h @@ -51,6 +51,7 @@ class DirAccessUnix : public DirAccess { protected: virtual String fix_unicode_name(const char *p_name) const { return String::utf8(p_name); } + virtual bool is_hidden(const String &p_name); public: virtual Error list_dir_begin(); ///< This starts dir listing diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 6b98a344dc..96c338f86b 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -48,7 +48,7 @@ #include <mach/mach_time.h> #endif -#if defined(__FreeBSD__) || defined(__OpenBSD__) +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) #include <sys/param.h> #include <sys/sysctl.h> #endif @@ -477,7 +477,7 @@ String OS_Unix::get_executable_path() const { return OS::get_executable_path(); } return b; -#elif defined(__OpenBSD__) +#elif defined(__OpenBSD__) || defined(__NetBSD__) char resolved_path[MAXPATHLEN]; realpath(OS::get_executable_path().utf8().get_data(), resolved_path); diff --git a/drivers/unix/thread_posix.cpp b/drivers/unix/thread_posix.cpp index aa1b5019ca..285088342b 100644 --- a/drivers/unix/thread_posix.cpp +++ b/drivers/unix/thread_posix.cpp @@ -29,17 +29,17 @@ /*************************************************************************/ #include "thread_posix.h" -#include "core/script_language.h" #if (defined(UNIX_ENABLED) || defined(PTHREAD_ENABLED)) && !defined(NO_THREADS) +#include "core/os/memory.h" +#include "core/safe_refcount.h" +#include "core/script_language.h" + #ifdef PTHREAD_BSD_SET_NAME #include <pthread_np.h> #endif -#include "core/os/memory.h" -#include "core/safe_refcount.h" - static void _thread_id_key_destr_callback(void *p_value) { memdelete(static_cast<Thread::ID *>(p_value)); } @@ -126,6 +126,8 @@ Error ThreadPosix::set_name_func_posix(const String &p_name) { #ifdef PTHREAD_BSD_SET_NAME pthread_set_name_np(running_thread, p_name.utf8().get_data()); int err = 0; // Open/FreeBSD ignore errors in this function +#elif defined(PTHREAD_NETBSD_SET_NAME) + int err = pthread_setname_np(running_thread, "%s", const_cast<char *>(p_name.utf8().get_data())); #else int err = pthread_setname_np(running_thread, p_name.utf8().get_data()); #endif // PTHREAD_BSD_SET_NAME diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index d569a2ca0a..52c984cbc0 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -4959,11 +4959,6 @@ void AnimationTrackEditor::_scroll_input(const Ref<InputEvent> &p_event) { box_selection->set_size(rect.size); box_select_rect = rect; - - if (get_local_mouse_position().y < 0) { - //avoid box selection from going up and lose focus to viewport - warp_mouse(Vector2(mm->get_position().x, 0)); - } } } @@ -5763,7 +5758,7 @@ AnimationTrackEditor::AnimationTrackEditor() { box_selection = memnew(Control); add_child(box_selection); - box_selection->set_as_toplevel(true); + box_selection->set_as_top_level(true); box_selection->set_mouse_filter(MOUSE_FILTER_IGNORE); box_selection->hide(); box_selection->connect("draw", callable_mp(this, &AnimationTrackEditor::_box_selection_draw)); diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index 20d29d47f4..d1661fd7b3 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -754,8 +754,9 @@ void ConnectionsDock::_open_connection_dialog(ConnectDialog::ConnectionData cToE Node *dst = static_cast<Node *>(cToEdit.target); if (src && dst) { + const String &signalname = cToEdit.signal; connect_dialog->set_title(TTR("Edit Connection:") + cToEdit.signal); - connect_dialog->popup_centered(); + connect_dialog->popup_dialog(signalname); connect_dialog->init(cToEdit, true); } } diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index adb09532eb..a3deb95130 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -846,7 +846,7 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) { audioprev_hbc->add_child(audio_value_preview_label); slider->add_child(audio_value_preview_box); - audio_value_preview_box->set_as_toplevel(true); + audio_value_preview_box->set_as_top_level(true); Ref<StyleBoxFlat> panel_style = memnew(StyleBoxFlat); panel_style->set_bg_color(Color(0.0f, 0.0f, 0.0f, 0.8f)); audio_value_preview_box->add_theme_style_override("panel", panel_style); diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 5118ccacad..1002c4917b 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -936,7 +936,13 @@ void EditorData::script_class_save_icon_paths() { } } - ProjectSettings::get_singleton()->set("_global_script_class_icons", d); + if (d.empty()) { + if (ProjectSettings::get_singleton()->has_setting("_global_script_class_icons")) { + ProjectSettings::get_singleton()->clear("_global_script_class_icons"); + } + } else { + ProjectSettings::get_singleton()->set("_global_script_class_icons", d); + } ProjectSettings::get_singleton()->save(); } diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index 1d7429eb64..d3a4dbb6e7 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -1406,6 +1406,20 @@ String EditorExportPlatform::test_etc2() const { return String(); } +String EditorExportPlatform::test_etc2_or_pvrtc() const { + String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name"); + bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2"); + bool pvrtc_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_pvrtc"); + + if (driver == "GLES2" && !pvrtc_supported) { + return TTR("Target platform requires 'PVRTC' texture compression for GLES2. Enable 'Import Pvrtc' in Project Settings."); + } else if (driver == "Vulkan" && !etc2_supported && !pvrtc_supported) { + // FIXME: Review if this is true for Vulkan. + return TTR("Target platform requires 'ETC2' or 'PVRTC' texture compression for Vulkan. Enable 'Import Etc 2' or 'Import Pvrtc' in Project Settings."); + } + return String(); +} + int EditorExport::get_export_preset_count() const { return export_presets.size(); } diff --git a/editor/editor_export.h b/editor/editor_export.h index ac1051571c..fa6be88302 100644 --- a/editor/editor_export.h +++ b/editor/editor_export.h @@ -277,6 +277,7 @@ public: virtual Ref<Texture2D> get_run_icon() const { return get_logo(); } String test_etc2() const; //generic test for etc2 since most platforms use it + String test_etc2_or_pvrtc() const; // test for etc2 or pvrtc support for iOS virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const = 0; virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const = 0; diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 0e851734a7..2140b6bd13 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -60,7 +60,7 @@ VBoxContainer *EditorFileDialog::get_vbox() { void EditorFileDialog::_notification(int p_what) { if (p_what == NOTIFICATION_READY || p_what == NOTIFICATION_THEME_CHANGED) { - // update icons + // Update icons. mode_thumbnails->set_icon(item_list->get_theme_icon("FileThumbnail", "EditorIcons")); mode_list->set_icon(item_list->get_theme_icon("FileList", "EditorIcons")); dir_prev->set_icon(item_list->get_theme_icon("Back", "EditorIcons")); @@ -94,7 +94,7 @@ void EditorFileDialog::_notification(int p_what) { } set_display_mode((DisplayMode)EditorSettings::get_singleton()->get("filesystem/file_dialog/display_mode").operator int()); - // update icons + // Update icons. mode_thumbnails->set_icon(item_list->get_theme_icon("FileThumbnail", "EditorIcons")); mode_list->set_icon(item_list->get_theme_icon("FileList", "EditorIcons")); dir_prev->set_icon(item_list->get_theme_icon("Back", "EditorIcons")); @@ -138,9 +138,7 @@ void EditorFileDialog::_unhandled_input(const Ref<InputEvent> &p_event) { handled = true; } if (ED_IS_SHORTCUT("file_dialog/toggle_hidden_files", p_event)) { - bool show = !show_hidden_files; - set_show_hidden_files(show); - EditorSettings::get_singleton()->set("filesystem/file_dialog/show_hidden_files", show); + set_show_hidden_files(!show_hidden_files); handled = true; } if (ED_IS_SHORTCUT("file_dialog/toggle_favorite", p_event)) { @@ -559,7 +557,7 @@ void EditorFileDialog::_item_list_item_rmb_selected(int p_item, const Vector2 &p continue; } Dictionary item_meta = item_list->get_item_metadata(i); - if (item_meta["path"] == "res://.import") { + if (String(item_meta["path"]).begins_with("res://.godot")) { allow_delete = false; break; } @@ -1385,6 +1383,11 @@ void EditorFileDialog::_bind_methods() { } void EditorFileDialog::set_show_hidden_files(bool p_show) { + if (p_show == show_hidden_files) { + return; + } + + EditorSettings::get_singleton()->set("filesystem/file_dialog/show_hidden_files", p_show); show_hidden_files = p_show; show_hidden->set_pressed(p_show); invalidate(); @@ -1646,7 +1649,7 @@ EditorFileDialog::EditorFileDialog() { filter->connect("item_selected", callable_mp(this, &EditorFileDialog::_filter_selected)); confirm_save = memnew(ConfirmationDialog); - //confirm_save->set_as_toplevel(true); + //confirm_save->set_as_top_level(true); add_child(confirm_save); confirm_save->connect("confirmed", callable_mp(this, &EditorFileDialog::_save_confirm_pressed)); diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index a5edcf5c22..5607bb3f17 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -1865,13 +1865,14 @@ void EditorFileSystem::_find_group_files(EditorFileSystemDirectory *efd, Map<Str } void EditorFileSystem::reimport_files(const Vector<String> &p_files) { - { //check that .import folder exists + { + // Ensure that ProjectSettings::IMPORTED_FILES_PATH exists. DirAccess *da = DirAccess::open("res://"); - if (da->change_dir(".import") != OK) { - Error err = da->make_dir(".import"); - if (err) { + if (da->change_dir(ProjectSettings::IMPORTED_FILES_PATH) != OK) { + Error err = da->make_dir_recursive(ProjectSettings::IMPORTED_FILES_PATH); + if (err || da->change_dir(ProjectSettings::IMPORTED_FILES_PATH) != OK) { memdelete(da); - ERR_FAIL_MSG("Failed to create 'res://.import' folder."); + ERR_FAIL_MSG("Failed to create '" + ProjectSettings::IMPORTED_FILES_PATH + "' folder."); } } memdelete(da); @@ -2055,8 +2056,8 @@ EditorFileSystem::EditorFileSystem() { scanning_changes_done = false; DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES); - if (da->change_dir("res://.import") != OK) { - da->make_dir("res://.import"); + if (da->change_dir(ProjectSettings::IMPORTED_FILES_PATH) != OK) { + da->make_dir(ProjectSettings::IMPORTED_FILES_PATH); } // This should probably also work on Unix and use the string it returns for FAT32 or exFAT using_fat32_or_exfat = (da->get_filesystem_type() == "FAT32" || da->get_filesystem_type() == "exFAT"); diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 336e34298f..9900e8184d 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -48,7 +48,7 @@ Size2 EditorProperty::get_minimum_size() const { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } if (!c->is_visible()) { @@ -117,7 +117,7 @@ void EditorProperty::_notification(int p_what) { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } if (c == bottom_editor) { @@ -179,7 +179,7 @@ void EditorProperty::_notification(int p_what) { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } if (c == bottom_editor) { @@ -1133,7 +1133,7 @@ void EditorInspectorSection::_notification(int p_what) { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } if (!c->is_visible_in_tree()) { @@ -1225,7 +1225,7 @@ Size2 EditorInspectorSection::get_minimum_size() const { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } if (!c->is_visible()) { @@ -1969,7 +1969,7 @@ void EditorInspector::refresh() { if (refresh_countdown > 0 || changing) { return; } - refresh_countdown = refresh_interval_cache; + refresh_countdown = EditorSettings::get_singleton()->get("docks/property_editor/auto_refresh_interval"); } Object *EditorInspector::get_edited_object() { @@ -2332,8 +2332,6 @@ void EditorInspector::_node_removed(Node *p_node) { void EditorInspector::_notification(int p_what) { if (p_what == NOTIFICATION_READY) { EditorFeatureProfileManager::get_singleton()->connect("current_feature_profile_changed", callable_mp(this, &EditorInspector::_feature_profile_changed)); - refresh_interval_cache = EDITOR_GET("docks/property_editor/auto_refresh_interval"); - refresh_countdown = refresh_interval_cache; } if (p_what == NOTIFICATION_ENTER_TREE) { @@ -2369,9 +2367,6 @@ void EditorInspector::_notification(int p_what) { } } } - } else { - // Restart countdown if <= 0 - refresh_countdown = refresh_interval_cache; } changing++; @@ -2404,9 +2399,6 @@ void EditorInspector::_notification(int p_what) { add_theme_style_override("bg", get_theme_stylebox("bg", "Tree")); } - refresh_interval_cache = EDITOR_GET("docks/property_editor/auto_refresh_interval"); - refresh_countdown = refresh_interval_cache; - update_tree(); } } @@ -2570,7 +2562,6 @@ EditorInspector::EditorInspector() { update_all_pending = false; update_tree_pending = false; refresh_countdown = 0; - refresh_interval_cache = 0; read_only = false; search_box = nullptr; keying = false; diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index d1046315f4..36b80a7dd4 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -294,7 +294,6 @@ class EditorInspector : public ScrollContainer { bool deletable_properties; float refresh_countdown; - float refresh_interval_cache; bool update_tree_pending; StringName _prop_edited; StringName property_selected; diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index 9595eb8a72..6fbafc7ff3 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -79,7 +79,15 @@ void EditorLog::_clear_request() { } void EditorLog::_copy_request() { - log->selection_copy(); + String text = log->get_selected_text(); + + if (text == "") { + text = log->get_text(); + } + + if (text != "") { + DisplayServer::get_singleton()->clipboard_set(text); + } } void EditorLog::clear() { diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 4835b4beab..8edda3123b 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2545,6 +2545,8 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { } } break; case RUN_PROJECT_DATA_FOLDER: { + // ensure_user_data_dir() to prevent the edge case: "Open Project Data Folder" won't work after the project was renamed in ProjectSettingsEditor unless the project is saved + OS::get_singleton()->ensure_user_data_dir(); OS::get_singleton()->shell_open(String("file://") + OS::get_singleton()->get_user_data_dir()); } break; case FILE_EXPLORE_ANDROID_BUILD_TEMPLATES: { @@ -6198,7 +6200,9 @@ EditorNode::EditorNode() { #else p->add_shortcut(ED_SHORTCUT("editor/fullscreen_mode", TTR("Toggle Fullscreen"), KEY_MASK_SHIFT | KEY_F11), SETTINGS_TOGGLE_FULLSCREEN); #endif -#ifdef WINDOWS_ENABLED +#if defined(WINDOWS_ENABLED) && defined(WINDOWS_SUBSYSTEM_CONSOLE) + // The console can only be toggled if the application was built for the console subsystem, + // not the GUI subsystem. p->add_item(TTR("Toggle System Console"), SETTINGS_TOGGLE_CONSOLE); #endif p->add_separator(); diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index bce46b719a..082c317655 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -234,8 +234,8 @@ String EditorInterface::get_current_path() const { return EditorNode::get_singleton()->get_filesystem_dock()->get_current_path(); } -void EditorInterface::inspect_object(Object *p_obj, const String &p_for_property) { - EditorNode::get_singleton()->push_item(p_obj, p_for_property); +void EditorInterface::inspect_object(Object *p_obj, const String &p_for_property, bool p_inspector_only) { + EditorNode::get_singleton()->push_item(p_obj, p_for_property, p_inspector_only); } EditorFileSystem *EditorInterface::get_resource_file_system() { @@ -301,7 +301,7 @@ bool EditorInterface::is_distraction_free_mode_enabled() const { EditorInterface *EditorInterface::singleton = nullptr; void EditorInterface::_bind_methods() { - ClassDB::bind_method(D_METHOD("inspect_object", "object", "for_property"), &EditorInterface::inspect_object, DEFVAL(String())); + ClassDB::bind_method(D_METHOD("inspect_object", "object", "for_property", "inspector_only"), &EditorInterface::inspect_object, DEFVAL(String()), DEFVAL(false)); ClassDB::bind_method(D_METHOD("get_selection"), &EditorInterface::get_selection); ClassDB::bind_method(D_METHOD("get_editor_settings"), &EditorInterface::get_editor_settings); ClassDB::bind_method(D_METHOD("get_script_editor"), &EditorInterface::get_script_editor); diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h index c7803f73c9..40a91cbfb9 100644 --- a/editor/editor_plugin.h +++ b/editor/editor_plugin.h @@ -89,7 +89,7 @@ public: String get_selected_path() const; String get_current_path() const; - void inspect_object(Object *p_obj, const String &p_for_property = String()); + void inspect_object(Object *p_obj, const String &p_for_property = String(), bool p_inspector_only = false); EditorSelection *get_selection(); //EditorImportExport *get_import_export(); diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index d2250fed7a..3170ea5ff8 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -164,7 +164,6 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref< r_texture = generated; int small_thumbnail_size = EditorNode::get_singleton()->get_theme_base()->get_theme_icon("Object", "EditorIcons")->get_width(); // Kind of a workaround to retrieve the default icon size - small_thumbnail_size *= EDSCALE; if (preview_generators[i]->can_generate_small_preview()) { Ref<Texture2D> generated_small; diff --git a/editor/editor_settings.h b/editor/editor_settings.h index 4896fb58db..04bb49bb51 100644 --- a/editor/editor_settings.h +++ b/editor/editor_settings.h @@ -44,7 +44,6 @@ class EditorPlugin; class EditorSettings : public Resource { GDCLASS(EditorSettings, Resource); -private: _THREAD_SAFE_CLASS_ public: diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index d76a3d2da7..efc966c6c4 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -356,7 +356,12 @@ String EditorSpinSlider::get_label() const { } void EditorSpinSlider::_evaluate_input_text() { - String text = value_input->get_text(); + // Replace comma with dot to support it as decimal separator (GH-6028). + // This prevents using functions like `pow()`, but using functions + // in EditorSpinSlider is a barely known (and barely used) feature. + // Instead, we'd rather support German/French keyboard layouts out of the box. + const String text = value_input->get_text().replace(",", "."); + Ref<Expression> expr; expr.instance(); Error err = expr->parse(text); @@ -478,7 +483,7 @@ EditorSpinSlider::EditorSpinSlider() { grabber = memnew(TextureRect); add_child(grabber); grabber->hide(); - grabber->set_as_toplevel(true); + grabber->set_as_top_level(true); grabber->set_mouse_filter(MOUSE_FILTER_STOP); grabber->connect("mouse_entered", callable_mp(this, &EditorSpinSlider::_grabber_mouse_entered)); grabber->connect("mouse_exited", callable_mp(this, &EditorSpinSlider::_grabber_mouse_exited)); diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 11b0228fd5..79525ced51 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -218,8 +218,15 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme = // Generate icons. if (!p_only_thumbs) { for (int i = 0; i < editor_icons_count; i++) { + float icon_scale = EDSCALE; + + // Always keep the DefaultProjectIcon at the default size + if (strcmp(editor_icons_names[i], "DefaultProjectIcon") == 0) { + icon_scale = 1.0f; + } + const int is_exception = exceptions.has(editor_icons_names[i]); - const Ref<ImageTexture> icon = editor_generate_icon(i, !is_exception); + const Ref<ImageTexture> icon = editor_generate_icon(i, !is_exception, icon_scale); p_theme->set_icon(editor_icons_names[i], "EditorIcons", icon); } diff --git a/editor/icons/AutoKey.svg b/editor/icons/AutoKey.svg index 9852d1360e..acc6665baf 100644 --- a/editor/icons/AutoKey.svg +++ b/editor/icons/AutoKey.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><path d="m5 3-3 5h-1v4h1.0507812a2.5 2.5 0 0 1 2.4492188-2 2.5 2.5 0 0 1 2.4453125 2h2.1054687a2.5 2.5 0 0 1 2.4492188-2 2.5 2.5 0 0 1 2.445312 2h1.054688v-4h-1l-4-5zm1 1h3l3 4h-8z" stroke-width=".033311"/><circle cx="4.5" cy="12.5" r="1.5"/><circle cx="11.5" cy="12.5" r="1.5"/></g></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><circle cx="8" cy="5" r="4"/><path d="m11 13c0 1.6569 1.3431 3 3 3h1v-2h-1c-.55228-.00001-.99999-.44772-1-1 .00001-.55228.44772-.99999 1-1h1v-2h-1c-1.6569 0-3 1.3431-3 3z" fill-opacity=".99608"/><path d="m4 10c-1.6569 0-3 1.3431-3 3v3h2v-3c.0000096-.5523.44772-1 1-1h1v-2z" fill-opacity=".99608"/><path d="m8 10c-3 0-3 3-3 3s0 3 3 3h1v-2h-1s-1 0-1-1h3 1s0-3-3-3zm-1 1h2v1h-2z"/></g></svg> diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index bb144d2ed6..266df78949 100644 --- a/editor/import/editor_scene_importer_gltf.cpp +++ b/editor/import/editor_scene_importer_gltf.cpp @@ -184,8 +184,11 @@ String EditorSceneImporterGLTF::_gen_unique_name(GLTFState &state, const String String EditorSceneImporterGLTF::_sanitize_bone_name(const String &name) { String p_name = name.camelcase_to_underscore(true); - RegEx pattern_del("([^a-zA-Z0-9_ ])+"); - p_name = pattern_del.sub(p_name, "", true); + RegEx pattern_nocolon(":"); + p_name = pattern_nocolon.sub(p_name, "_", true); + + RegEx pattern_noslash("/"); + p_name = pattern_noslash.sub(p_name, "_", true); RegEx pattern_nospace(" +"); p_name = pattern_nospace.sub(p_name, "_", true); @@ -200,8 +203,10 @@ String EditorSceneImporterGLTF::_sanitize_bone_name(const String &name) { } String EditorSceneImporterGLTF::_gen_unique_bone_name(GLTFState &state, const GLTFSkeletonIndex skel_i, const String &p_name) { - const String s_name = _sanitize_bone_name(p_name); - + String s_name = _sanitize_bone_name(p_name); + if (s_name.empty()) { + s_name = "bone"; + } String name; int index = 1; while (true) { @@ -379,13 +384,17 @@ Error EditorSceneImporterGLTF::_parse_buffers(GLTFState &state, const String &p_ Vector<uint8_t> buffer_data; String uri = buffer["uri"]; - if (uri.findn("data:application/octet-stream;base64") == 0) { - //embedded data + if (uri.begins_with("data:")) { // Embedded data using base64. + // Validate data MIME types and throw an error if it's one we don't know/support. + if (!uri.begins_with("data:application/octet-stream;base64") && + !uri.begins_with("data:application/gltf-buffer;base64")) { + ERR_PRINT("glTF: Got buffer with an unknown URI data type: " + uri); + } buffer_data = _parse_base64_uri(uri); - } else { - uri = p_base_path.plus_file(uri).replace("\\", "/"); //fix for windows + } else { // Relative path to an external image file. + uri = p_base_path.plus_file(uri).replace("\\", "/"); // Fix for Windows. buffer_data = FileAccess::get_file_as_array(uri); - ERR_FAIL_COND_V(buffer.size() == 0, ERR_PARSE_ERROR); + ERR_FAIL_COND_V_MSG(buffer.size() == 0, ERR_PARSE_ERROR, "glTF: Couldn't load binary file as an array: " + uri); } ERR_FAIL_COND_V(!buffer.has("byteLength"), ERR_PARSE_ERROR); @@ -1226,6 +1235,12 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) { const Ref<Material> &mat = state.materials[material]; mesh.mesh->surface_set_material(mesh.mesh->get_surface_count() - 1, mat); + } else { + Ref<StandardMaterial3D> mat; + mat.instance(); + mat->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true); + + mesh.mesh->surface_set_material(mesh.mesh->get_surface_count() - 1, mat); } } @@ -1255,12 +1270,28 @@ Error EditorSceneImporterGLTF::_parse_images(GLTFState &state, const String &p_b return OK; } + // Ref: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#images + const Array &images = state.json["images"]; for (int i = 0; i < images.size(); i++) { const Dictionary &d = images[i]; + // glTF 2.0 supports PNG and JPEG types, which can be specified as (from spec): + // "- a URI to an external file in one of the supported images formats, or + // - a URI with embedded base64-encoded data, or + // - a reference to a bufferView; in that case mimeType must be defined." + // Since mimeType is optional for external files and base64 data, we'll have to + // fall back on letting Godot parse the data to figure out if it's PNG or JPEG. + + // We'll assume that we use either URI or bufferView, so let's warn the user + // if their image somehow uses both. And fail if it has neither. + ERR_CONTINUE_MSG(!d.has("uri") && !d.has("bufferView"), "Invalid image definition in glTF file, it should specific an 'uri' or 'bufferView'."); + if (d.has("uri") && d.has("bufferView")) { + WARN_PRINT("Invalid image definition in glTF file using both 'uri' and 'bufferView'. 'bufferView' will take precedence."); + } + String mimetype; - if (d.has("mimeType")) { + if (d.has("mimeType")) { // Should be "image/png" or "image/jpeg". mimetype = d["mimeType"]; } @@ -1269,23 +1300,52 @@ Error EditorSceneImporterGLTF::_parse_images(GLTFState &state, const String &p_b int data_size = 0; if (d.has("uri")) { + // Handles the first two bullet points from the spec (embedded data, or external file). String uri = d["uri"]; - if (uri.findn("data:application/octet-stream;base64") == 0 || - uri.findn("data:" + mimetype + ";base64") == 0) { - //embedded data + if (uri.begins_with("data:")) { // Embedded data using base64. + // Validate data MIME types and throw an error if it's one we don't know/support. + if (!uri.begins_with("data:application/octet-stream;base64") && + !uri.begins_with("data:application/gltf-buffer;base64") && + !uri.begins_with("data:image/png;base64") && + !uri.begins_with("data:image/jpeg;base64")) { + ERR_PRINT("glTF: Got image data with an unknown URI data type: " + uri); + } data = _parse_base64_uri(uri); data_ptr = data.ptr(); data_size = data.size(); - } else { - uri = p_base_path.plus_file(uri).replace("\\", "/"); //fix for windows - Ref<Texture2D> texture = ResourceLoader::load(uri); - state.images.push_back(texture); - continue; + // mimeType is optional, but if we have it defined in the URI, let's use it. + if (mimetype.empty()) { + if (uri.begins_with("data:image/png;base64")) { + mimetype = "image/png"; + } else if (uri.begins_with("data:image/jpeg;base64")) { + mimetype = "image/jpeg"; + } + } + } else { // Relative path to an external image file. + uri = p_base_path.plus_file(uri).replace("\\", "/"); // Fix for Windows. + // The spec says that if mimeType is defined, we should enforce it. + // So we should only rely on ResourceLoader::load if mimeType is not defined, + // otherwise we should use the same logic as for buffers. + if (mimetype == "image/png" || mimetype == "image/jpeg") { + // Load data buffer and rely on PNG and JPEG-specific logic below to load the image. + // This makes it possible to load a file with a wrong extension but correct MIME type, + // e.g. "foo.jpg" containing PNG data and with MIME type "image/png". ResourceLoader would fail. + data = FileAccess::get_file_as_array(uri); + ERR_FAIL_COND_V_MSG(data.size() == 0, ERR_PARSE_ERROR, "glTF: Couldn't load image file as an array: " + uri); + data_ptr = data.ptr(); + data_size = data.size(); + } else { + // Good old ResourceLoader will rely on file extension. + Ref<Texture2D> texture = ResourceLoader::load(uri); + state.images.push_back(texture); + continue; + } } - } + } else if (d.has("bufferView")) { + // Handles the third bullet point from the spec (bufferView). + ERR_FAIL_COND_V_MSG(mimetype.empty(), ERR_FILE_CORRUPT, "glTF: Image specifies 'bufferView' but no 'mimeType', which is invalid."); - if (d.has("bufferView")) { const GLTFBufferViewIndex bvi = d["bufferView"]; ERR_FAIL_INDEX_V(bvi, state.buffer_views.size(), ERR_PARAMETER_RANGE_ERROR); @@ -1301,45 +1361,36 @@ Error EditorSceneImporterGLTF::_parse_images(GLTFState &state, const String &p_b data_size = bv.byte_length; } - ERR_FAIL_COND_V(mimetype == "", ERR_FILE_CORRUPT); + Ref<Image> img; - if (mimetype.findn("png") != -1) { - //is a png + if (mimetype == "image/png") { // Load buffer as PNG. ERR_FAIL_COND_V(Image::_png_mem_loader_func == nullptr, ERR_UNAVAILABLE); - - const Ref<Image> img = Image::_png_mem_loader_func(data_ptr, data_size); - - ERR_FAIL_COND_V(img.is_null(), ERR_FILE_CORRUPT); - - Ref<ImageTexture> t; - t.instance(); - t->create_from_image(img); - - state.images.push_back(t); - continue; - } - - if (mimetype.findn("jpeg") != -1) { - //is a jpg + img = Image::_png_mem_loader_func(data_ptr, data_size); + } else if (mimetype == "image/jpeg") { // Loader buffer as JPEG. ERR_FAIL_COND_V(Image::_jpg_mem_loader_func == nullptr, ERR_UNAVAILABLE); + img = Image::_jpg_mem_loader_func(data_ptr, data_size); + } else { + // We can land here if we got an URI with base64-encoded data with application/* MIME type, + // and the optional mimeType property was not defined to tell us how to handle this data (or was invalid). + // So let's try PNG first, then JPEG. + ERR_FAIL_COND_V(Image::_png_mem_loader_func == nullptr, ERR_UNAVAILABLE); + img = Image::_png_mem_loader_func(data_ptr, data_size); + if (img.is_null()) { + ERR_FAIL_COND_V(Image::_jpg_mem_loader_func == nullptr, ERR_UNAVAILABLE); + img = Image::_jpg_mem_loader_func(data_ptr, data_size); + } + } - const Ref<Image> img = Image::_jpg_mem_loader_func(data_ptr, data_size); - - ERR_FAIL_COND_V(img.is_null(), ERR_FILE_CORRUPT); - - Ref<ImageTexture> t; - t.instance(); - t->create_from_image(img); - - state.images.push_back(t); + ERR_FAIL_COND_V_MSG(img.is_null(), ERR_FILE_CORRUPT, "glTF: Couldn't load image with its given mimetype: " + mimetype); - continue; - } + Ref<ImageTexture> t; + t.instance(); + t->create_from_image(img); - ERR_FAIL_V(ERR_FILE_CORRUPT); + state.images.push_back(t); } - print_verbose("Total images: " + itos(state.images.size())); + print_verbose("glTF: Total images: " + itos(state.images.size())); return OK; } @@ -1386,6 +1437,7 @@ Error EditorSceneImporterGLTF::_parse_materials(GLTFState &state) { if (d.has("name")) { material->set_name(d["name"]); } + material->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true); if (d.has("pbrMetallicRoughness")) { const Dictionary &mr = d["pbrMetallicRoughness"]; @@ -1498,7 +1550,7 @@ Error EditorSceneImporterGLTF::_parse_materials(GLTFState &state) { state.materials.push_back(material); } - print_verbose("Total materials: " + itos(state.materials.size())); + print_verbose("glTF: Total materials: " + itos(state.materials.size())); return OK; } @@ -3049,6 +3101,8 @@ Node3D *EditorSceneImporterGLTF::_generate_scene(GLTFState &state, const int p_b } Node *EditorSceneImporterGLTF::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { + print_verbose(vformat("glTF: Importing file %s as scene.", p_path)); + GLTFState state; if (p_path.to_lower().ends_with("glb")) { diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index 28ac85457b..5742becf3a 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -910,7 +910,11 @@ void EditorAssetLibrary::_search(int p_page) { _api_request("asset", REQUESTING_SEARCH, args); } -void EditorAssetLibrary::_search_text_entered(const String &p_text) { +void EditorAssetLibrary::_search_text_changed(const String &p_text) { + filter_debounce_timer->start(); +} + +void EditorAssetLibrary::_filter_debounce_timer_timeout() { _search(); } @@ -1299,10 +1303,15 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) { filter = memnew(LineEdit); search_hb->add_child(filter); filter->set_h_size_flags(Control::SIZE_EXPAND_FILL); - filter->connect("text_entered", callable_mp(this, &EditorAssetLibrary::_search_text_entered)); - search = memnew(Button(TTR("Search"))); - search->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), make_binds(0)); - search_hb->add_child(search); + filter->connect("text_changed", callable_mp(this, &EditorAssetLibrary::_search_text_changed)); + + // Perform a search automatically if the user hasn't entered any text for a certain duration. + // This way, the user doesn't need to press Enter to initiate their search. + filter_debounce_timer = memnew(Timer); + filter_debounce_timer->set_one_shot(true); + filter_debounce_timer->set_wait_time(0.25); + filter_debounce_timer->connect("timeout", callable_mp(this, &EditorAssetLibrary::_filter_debounce_timer_timeout)); + search_hb->add_child(filter_debounce_timer); if (!p_templates_only) { search_hb->add_child(memnew(VSeparator)); diff --git a/editor/plugins/asset_library_editor_plugin.h b/editor/plugins/asset_library_editor_plugin.h index 3fca8a1084..f7ad53f87b 100644 --- a/editor/plugins/asset_library_editor_plugin.h +++ b/editor/plugins/asset_library_editor_plugin.h @@ -183,10 +183,10 @@ class EditorAssetLibrary : public PanelContainer { Label *library_loading; Label *library_error; LineEdit *filter; + Timer *filter_debounce_timer; OptionButton *categories; OptionButton *repository; OptionButton *sort; - Button *search; HBoxContainer *error_hb; TextureRect *error_tr; Label *error_label; @@ -280,10 +280,12 @@ class EditorAssetLibrary : public PanelContainer { void _search(int p_page = 0); void _rerun_search(int p_ignore); + void _search_text_changed(const String &p_text = ""); void _search_text_entered(const String &p_text = ""); void _api_request(const String &p_request, RequestType p_request_type, const String &p_arguments = ""); void _http_request_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data); void _http_download_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data); + void _filter_debounce_timer_timeout(); void _repository_changed(int p_repository_id); void _support_toggled(int p_support); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 9427f82f9e..c06580df26 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -548,7 +548,7 @@ void CanvasItemEditor::_expand_encompassing_rect_using_children(Rect2 &r_rect, c const CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node); for (int i = p_node->get_child_count() - 1; i >= 0; i--) { - if (canvas_item && !canvas_item->is_set_as_toplevel()) { + if (canvas_item && !canvas_item->is_set_as_top_level()) { _expand_encompassing_rect_using_children(r_rect, p_node->get_child(i), r_first, p_parent_xform * canvas_item->get_transform(), p_canvas_xform); } else { const CanvasLayer *canvas_layer = Object::cast_to<CanvasLayer>(p_node); @@ -591,7 +591,7 @@ void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_no for (int i = p_node->get_child_count() - 1; i >= 0; i--) { if (canvas_item) { - if (!canvas_item->is_set_as_toplevel()) { + if (!canvas_item->is_set_as_top_level()) { _find_canvas_items_at_pos(p_pos, p_node->get_child(i), r_items, p_parent_xform * canvas_item->get_transform(), p_canvas_xform); } else { _find_canvas_items_at_pos(p_pos, p_node->get_child(i), r_items, canvas_item->get_transform(), p_canvas_xform); @@ -767,7 +767,7 @@ void CanvasItemEditor::_find_canvas_items_in_rect(const Rect2 &p_rect, Node *p_n if (!lock_children || !editable) { for (int i = p_node->get_child_count() - 1; i >= 0; i--) { if (canvas_item) { - if (!canvas_item->is_set_as_toplevel()) { + if (!canvas_item->is_set_as_top_level()) { _find_canvas_items_in_rect(p_rect, p_node->get_child(i), r_items, p_parent_xform * canvas_item->get_transform(), p_canvas_xform); } else { _find_canvas_items_in_rect(p_rect, p_node->get_child(i), r_items, canvas_item->get_transform(), p_canvas_xform); @@ -863,10 +863,11 @@ Vector2 CanvasItemEditor::_position_to_anchor(const Control *p_control, Vector2 ERR_FAIL_COND_V(!p_control, Vector2()); Rect2 parent_rect = p_control->get_parent_anchorable_rect(); - ERR_FAIL_COND_V(parent_rect.size.x == 0, Vector2()); - ERR_FAIL_COND_V(parent_rect.size.y == 0, Vector2()); - return (p_control->get_transform().xform(position) - parent_rect.position) / parent_rect.size; + Vector2 output = Vector2(); + output.x = (parent_rect.size.x == 0) ? 0.0 : (p_control->get_transform().xform(position).x - parent_rect.position.x) / parent_rect.size.x; + output.y = (parent_rect.size.y == 0) ? 0.0 : (p_control->get_transform().xform(position).y - parent_rect.position.y) / parent_rect.size.y; + return output; } void CanvasItemEditor::_save_canvas_item_ik_chain(const CanvasItem *p_canvas_item, List<float> *p_bones_length, List<Dictionary> *p_bones_state) { @@ -2598,12 +2599,28 @@ void CanvasItemEditor::_gui_input_viewport(const Ref<InputEvent> &p_event) { } void CanvasItemEditor::_update_cursor() { - CursorShape c = CURSOR_ARROW; - bool should_switch = false; - if (drag_selection.size() != 0) { - float angle = drag_selection[0]->_edit_get_rotation(); - should_switch = abs(Math::cos(angle)) < Math_SQRT12; + // Compute an eventual rotation of the cursor + CursorShape rotation_array[4] = { CURSOR_HSIZE, CURSOR_BDIAGSIZE, CURSOR_VSIZE, CURSOR_FDIAGSIZE }; + int rotation_array_index = 0; + + List<CanvasItem *> selection = _get_edited_canvas_items(); + if (selection.size() == 1) { + float angle = Math::fposmod((double)selection[0]->get_global_transform_with_canvas().get_rotation(), Math_PI); + if (angle > Math_PI * 7.0 / 8.0) { + rotation_array_index = 0; + } else if (angle > Math_PI * 5.0 / 8.0) { + rotation_array_index = 1; + } else if (angle > Math_PI * 3.0 / 8.0) { + rotation_array_index = 2; + } else if (angle > Math_PI * 1.0 / 8.0) { + rotation_array_index = 3; + } else { + rotation_array_index = 0; + } } + + // Choose the correct cursor + CursorShape c = CURSOR_ARROW; switch (drag_type) { case DRAG_NONE: switch (tool) { @@ -2625,38 +2642,28 @@ void CanvasItemEditor::_update_cursor() { break; case DRAG_LEFT: case DRAG_RIGHT: + c = rotation_array[rotation_array_index]; + break; case DRAG_V_GUIDE: - if (should_switch) { - c = CURSOR_VSIZE; - } else { - c = CURSOR_HSIZE; - } + c = CURSOR_HSIZE; break; case DRAG_TOP: case DRAG_BOTTOM: + c = rotation_array[(rotation_array_index + 2) % 4]; + break; case DRAG_H_GUIDE: - if (should_switch) { - c = CURSOR_HSIZE; - } else { - c = CURSOR_VSIZE; - } + c = CURSOR_VSIZE; break; case DRAG_TOP_LEFT: case DRAG_BOTTOM_RIGHT: + c = rotation_array[(rotation_array_index + 3) % 4]; + break; case DRAG_DOUBLE_GUIDE: - if (should_switch) { - c = CURSOR_BDIAGSIZE; - } else { - c = CURSOR_FDIAGSIZE; - } + c = CURSOR_FDIAGSIZE; break; case DRAG_TOP_RIGHT: case DRAG_BOTTOM_LEFT: - if (should_switch) { - c = CURSOR_FDIAGSIZE; - } else { - c = CURSOR_BDIAGSIZE; - } + c = rotation_array[(rotation_array_index + 1) % 4]; break; case DRAG_MOVE: c = CURSOR_MOVE; @@ -3619,7 +3626,7 @@ void CanvasItemEditor::_draw_invisible_nodes_positions(Node *p_node, const Trans Transform2D parent_xform = p_parent_xform; Transform2D canvas_xform = p_canvas_xform; - if (canvas_item && !canvas_item->is_set_as_toplevel()) { + if (canvas_item && !canvas_item->is_set_as_top_level()) { parent_xform = parent_xform * canvas_item->get_transform(); } else { CanvasLayer *cl = Object::cast_to<CanvasLayer>(p_node); @@ -3688,7 +3695,7 @@ void CanvasItemEditor::_draw_locks_and_groups(Node *p_node, const Transform2D &p Transform2D parent_xform = p_parent_xform; Transform2D canvas_xform = p_canvas_xform; - if (canvas_item && !canvas_item->is_set_as_toplevel()) { + if (canvas_item && !canvas_item->is_set_as_top_level()) { parent_xform = parent_xform * canvas_item->get_transform(); } else { CanvasLayer *cl = Object::cast_to<CanvasLayer>(p_node); @@ -3824,12 +3831,12 @@ void CanvasItemEditor::_draw_viewport() { _draw_grid(); _draw_ruler_tool(); - _draw_selection(); _draw_axis(); if (editor->get_edited_scene()) { _draw_locks_and_groups(editor->get_edited_scene()); _draw_invisible_nodes_positions(editor->get_edited_scene()); } + _draw_selection(); RID ci = viewport->get_canvas_item(); RenderingServer::get_singleton()->canvas_item_add_set_transform(ci, Transform2D()); @@ -4022,6 +4029,12 @@ void CanvasItemEditor::_notification(int p_what) { key_scale_button->set_icon(get_theme_icon("KeyScale", "EditorIcons")); key_insert_button->set_icon(get_theme_icon("Key", "EditorIcons")); key_auto_insert_button->set_icon(get_theme_icon("AutoKey", "EditorIcons")); + // Use a different color for the active autokey icon to make them easier + // to distinguish from the other key icons at the top. On a light theme, + // the icon will be dark, so we need to lighten it before blending it + // with the red color. + const Color key_auto_color = EditorSettings::get_singleton()->is_dark_theme() ? Color(1, 1, 1) : Color(4.25, 4.25, 4.25); + key_auto_insert_button->add_theme_color_override("icon_color_pressed", key_auto_color.lerp(Color(1, 0, 0), 0.55)); animation_menu->set_icon(get_theme_icon("GuiTabMenuHl", "EditorIcons")); zoom_minus->set_icon(get_theme_icon("ZoomLess", "EditorIcons")); diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index d28bbadf39..b2fd855834 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -900,12 +900,15 @@ bool Node3DEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_high } float dist = r.distance_to(gt.origin); - - if (dist > gs * (GIZMO_CIRCLE_SIZE - GIZMO_RING_HALF_WIDTH) && dist < gs * (GIZMO_CIRCLE_SIZE + GIZMO_RING_HALF_WIDTH)) { - float d = ray_pos.distance_to(r); - if (d < col_d) { - col_d = d; - col_axis = i; + Vector3 r_dir = (r - gt.origin).normalized(); + + if (_get_camera_normal().dot(r_dir) <= 0.005) { + if (dist > gs * (GIZMO_CIRCLE_SIZE - GIZMO_RING_HALF_WIDTH) && dist < gs * (GIZMO_CIRCLE_SIZE + GIZMO_RING_HALF_WIDTH)) { + float d = ray_pos.distance_to(r); + if (d < col_d) { + col_d = d; + col_axis = i; + } } } } @@ -3125,6 +3128,14 @@ void Node3DEditorViewport::_init_gizmo_instance(int p_idx) { RS::get_singleton()->instance_geometry_set_cast_shadows_setting(scale_plane_gizmo_instance[i], RS::SHADOW_CASTING_SETTING_OFF); RS::get_singleton()->instance_set_layer_mask(scale_plane_gizmo_instance[i], layer); } + + // Rotation white outline + rotate_gizmo_instance[3] = RS::get_singleton()->instance_create(); + RS::get_singleton()->instance_set_base(rotate_gizmo_instance[3], spatial_editor->get_rotate_gizmo(3)->get_rid()); + RS::get_singleton()->instance_set_scenario(rotate_gizmo_instance[3], get_tree()->get_root()->get_world_3d()->get_scenario()); + RS::get_singleton()->instance_set_visible(rotate_gizmo_instance[3], false); + RS::get_singleton()->instance_geometry_set_cast_shadows_setting(rotate_gizmo_instance[3], RS::SHADOW_CASTING_SETTING_OFF); + RS::get_singleton()->instance_set_layer_mask(rotate_gizmo_instance[3], layer); } void Node3DEditorViewport::_finish_gizmo_instances() { @@ -3135,6 +3146,8 @@ void Node3DEditorViewport::_finish_gizmo_instances() { RS::get_singleton()->free(scale_gizmo_instance[i]); RS::get_singleton()->free(scale_plane_gizmo_instance[i]); } + // Rotation white outline + RS::get_singleton()->free(rotate_gizmo_instance[3]); } void Node3DEditorViewport::_toggle_camera_preview(bool p_activate) { @@ -3226,6 +3239,8 @@ void Node3DEditorViewport::update_transform_gizmo_view() { RenderingServer::get_singleton()->instance_set_visible(scale_gizmo_instance[i], false); RenderingServer::get_singleton()->instance_set_visible(scale_plane_gizmo_instance[i], false); } + // Rotation white outline + RenderingServer::get_singleton()->instance_set_visible(rotate_gizmo_instance[3], false); return; } @@ -3264,6 +3279,9 @@ void Node3DEditorViewport::update_transform_gizmo_view() { RenderingServer::get_singleton()->instance_set_transform(scale_plane_gizmo_instance[i], xform); RenderingServer::get_singleton()->instance_set_visible(scale_plane_gizmo_instance[i], spatial_editor->is_gizmo_visible() && (spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_SCALE)); } + // Rotation white outline + RenderingServer::get_singleton()->instance_set_transform(rotate_gizmo_instance[3], xform); + RenderingServer::get_singleton()->instance_set_visible(rotate_gizmo_instance[3], spatial_editor->is_gizmo_visible() && (spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_ROTATE)); } void Node3DEditorViewport::set_state(const Dictionary &p_state) { @@ -3548,7 +3566,7 @@ Vector3 Node3DEditorViewport::_get_instance_position(const Point2 &p_pos) const return point + offset; } -AABB Node3DEditorViewport::_calculate_spatial_bounds(const Node3D *p_parent, bool p_exclude_toplevel_transform) { +AABB Node3DEditorViewport::_calculate_spatial_bounds(const Node3D *p_parent, bool p_exclude_top_level_transform) { AABB bounds; const MeshInstance3D *mesh_instance = Object::cast_to<MeshInstance3D>(p_parent); @@ -3573,7 +3591,7 @@ AABB Node3DEditorViewport::_calculate_spatial_bounds(const Node3D *p_parent, boo bounds = AABB(Vector3(-0.2, -0.2, -0.2), Vector3(0.4, 0.4, 0.4)); } - if (!p_exclude_toplevel_transform) { + if (!p_exclude_top_level_transform) { bounds = p_parent->get_transform().xform(bounds); } @@ -4403,7 +4421,7 @@ void Node3DEditor::select_gizmo_highlight_axis(int p_axis) { for (int i = 0; i < 3; i++) { move_gizmo[i]->surface_set_material(0, i == p_axis ? gizmo_color_hl[i] : gizmo_color[i]); move_plane_gizmo[i]->surface_set_material(0, (i + 6) == p_axis ? plane_gizmo_color_hl[i] : plane_gizmo_color[i]); - rotate_gizmo[i]->surface_set_material(0, (i + 3) == p_axis ? gizmo_color_hl[i] : gizmo_color[i]); + rotate_gizmo[i]->surface_set_material(0, (i + 3) == p_axis ? rotate_gizmo_color_hl[i] : rotate_gizmo_color[i]); scale_gizmo[i]->surface_set_material(0, (i + 9) == p_axis ? gizmo_color_hl[i] : gizmo_color[i]); scale_plane_gizmo[i]->surface_set_material(0, (i + 12) == p_axis ? plane_gizmo_color_hl[i] : plane_gizmo_color[i]); } @@ -5287,37 +5305,122 @@ void Node3DEditor::_init_indicators() { Ref<SurfaceTool> surftool = memnew(SurfaceTool); surftool->begin(Mesh::PRIMITIVE_TRIANGLES); - Vector3 circle[5] = { - ivec * 0.02 + ivec2 * 0.02 + ivec2 * GIZMO_CIRCLE_SIZE, - ivec * -0.02 + ivec2 * 0.02 + ivec2 * GIZMO_CIRCLE_SIZE, - ivec * -0.02 + ivec2 * -0.02 + ivec2 * GIZMO_CIRCLE_SIZE, - ivec * 0.02 + ivec2 * -0.02 + ivec2 * GIZMO_CIRCLE_SIZE, - ivec * 0.02 + ivec2 * 0.02 + ivec2 * GIZMO_CIRCLE_SIZE, - }; + int n = 128; // number of circle segments + int m = 6; // number of thickness segments - for (int k = 0; k < 64; k++) { - Basis ma(ivec, Math_PI * 2 * float(k) / 64); - Basis mb(ivec, Math_PI * 2 * float(k + 1) / 64); + for (int j = 0; j < n; ++j) { + Basis basis = Basis(ivec, (Math_PI * 2.0f * j) / n); - for (int j = 0; j < 4; j++) { - Vector3 points[4] = { - ma.xform(circle[j]), - mb.xform(circle[j]), - mb.xform(circle[j + 1]), - ma.xform(circle[j + 1]), - }; - surftool->add_vertex(points[0]); - surftool->add_vertex(points[1]); - surftool->add_vertex(points[2]); + Vector3 vertex = basis.xform(ivec2 * GIZMO_CIRCLE_SIZE); - surftool->add_vertex(points[0]); - surftool->add_vertex(points[2]); - surftool->add_vertex(points[3]); + for (int k = 0; k < m; ++k) { + Vector2 ofs = Vector2(Math::cos((Math_PI * 2.0 * k) / m), Math::sin((Math_PI * 2.0 * k) / m)); + Vector3 normal = ivec * ofs.x + ivec2 * ofs.y; + + surftool->add_normal(basis.xform(normal)); + surftool->add_vertex(vertex); } } - surftool->set_material(mat); - surftool->commit(rotate_gizmo[i]); + for (int j = 0; j < n; ++j) { + for (int k = 0; k < m; ++k) { + int current_ring = j * m; + int next_ring = ((j + 1) % n) * m; + int current_segment = k; + int next_segment = (k + 1) % m; + + surftool->add_index(current_ring + next_segment); + surftool->add_index(current_ring + current_segment); + surftool->add_index(next_ring + current_segment); + + surftool->add_index(next_ring + current_segment); + surftool->add_index(next_ring + next_segment); + surftool->add_index(current_ring + next_segment); + } + } + + Ref<Shader> rotate_shader = memnew(Shader); + + rotate_shader->set_code("\n" + "shader_type spatial; \n" + "render_mode unshaded, depth_test_disabled; \n" + "uniform vec4 albedo; \n" + "\n" + "mat3 orthonormalize(mat3 m) { \n" + " vec3 x = normalize(m[0]); \n" + " vec3 y = normalize(m[1] - x * dot(x, m[1])); \n" + " vec3 z = m[2] - x * dot(x, m[2]); \n" + " z = normalize(z - y * (dot(y,m[2]))); \n" + " return mat3(x,y,z); \n" + "} \n" + "\n" + "void vertex() { \n" + " mat3 mv = orthonormalize(mat3(MODELVIEW_MATRIX)); \n" + " vec3 n = mv * VERTEX; \n" + " float orientation = dot(vec3(0,0,-1),n); \n" + " if (orientation <= 0.005) { \n" + " VERTEX += NORMAL*0.02; \n" + " } \n" + "} \n" + "\n" + "void fragment() { \n" + " ALBEDO = albedo.rgb; \n" + " ALPHA = albedo.a; \n" + "}"); + + Ref<ShaderMaterial> rotate_mat = memnew(ShaderMaterial); + rotate_mat->set_render_priority(Material::RENDER_PRIORITY_MAX); + rotate_mat->set_shader(rotate_shader); + rotate_mat->set_shader_param("albedo", col); + rotate_gizmo_color[i] = rotate_mat; + + Array arrays = surftool->commit_to_arrays(); + rotate_gizmo[i]->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES, arrays); + rotate_gizmo[i]->surface_set_material(0, rotate_mat); + + Ref<ShaderMaterial> rotate_mat_hl = rotate_mat->duplicate(); + rotate_mat_hl->set_shader_param("albedo", Color(col.r, col.g, col.b, 1.0)); + rotate_gizmo_color_hl[i] = rotate_mat_hl; + + if (i == 2) { // Rotation white outline + Ref<ShaderMaterial> border_mat = rotate_mat->duplicate(); + + Ref<Shader> border_shader = memnew(Shader); + border_shader->set_code("\n" + "shader_type spatial; \n" + "render_mode unshaded, depth_test_disabled; \n" + "uniform vec4 albedo; \n" + "\n" + "mat3 orthonormalize(mat3 m) { \n" + " vec3 x = normalize(m[0]); \n" + " vec3 y = normalize(m[1] - x * dot(x, m[1])); \n" + " vec3 z = m[2] - x * dot(x, m[2]); \n" + " z = normalize(z - y * (dot(y,m[2]))); \n" + " return mat3(x,y,z); \n" + "} \n" + "\n" + "void vertex() { \n" + " mat3 mv = orthonormalize(mat3(MODELVIEW_MATRIX)); \n" + " mv = inverse(mv); \n" + " VERTEX += NORMAL*0.008; \n" + " vec3 camera_dir_local = mv * vec3(0,0,1); \n" + " vec3 camera_up_local = mv * vec3(0,1,0); \n" + " mat3 rotation_matrix = mat3(cross(camera_dir_local, camera_up_local), camera_up_local, camera_dir_local); \n" + " VERTEX = rotation_matrix * VERTEX; \n" + "} \n" + "\n" + "void fragment() { \n" + " ALBEDO = albedo.rgb; \n" + " ALPHA = albedo.a; \n" + "}"); + + border_mat->set_shader(border_shader); + border_mat->set_shader_param("albedo", Color(0.75, 0.75, 0.75, col.a / 3.0)); + + rotate_gizmo[3] = Ref<ArrayMesh>(memnew(ArrayMesh)); + rotate_gizmo[3]->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES, arrays); + rotate_gizmo[3]->surface_set_material(0, border_mat); + } } // Scale @@ -6707,7 +6810,7 @@ void EditorNode3DGizmoPlugin::_bind_methods() { ClassDB::bind_method(D_METHOD("get_material", "name", "gizmo"), &EditorNode3DGizmoPlugin::get_material); //, DEFVAL(Ref<EditorNode3DGizmo>())); BIND_VMETHOD(MethodInfo(Variant::STRING, "get_name")); - BIND_VMETHOD(MethodInfo(Variant::STRING, "get_priority")); + BIND_VMETHOD(MethodInfo(Variant::INT, "get_priority")); BIND_VMETHOD(MethodInfo(Variant::BOOL, "can_be_hidden")); BIND_VMETHOD(MethodInfo(Variant::BOOL, "is_selectable_when_hidden")); diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h index 6a8af38742..4f627b1d0c 100644 --- a/editor/plugins/node_3d_editor_plugin.h +++ b/editor/plugins/node_3d_editor_plugin.h @@ -412,7 +412,7 @@ private: real_t zoom_indicator_delay; - RID move_gizmo_instance[3], move_plane_gizmo_instance[3], rotate_gizmo_instance[3], scale_gizmo_instance[3], scale_plane_gizmo_instance[3]; + RID move_gizmo_instance[3], move_plane_gizmo_instance[3], rotate_gizmo_instance[4], scale_gizmo_instance[3], scale_plane_gizmo_instance[3]; String last_message; String message; @@ -450,7 +450,7 @@ private: Point2i _get_warped_mouse_motion(const Ref<InputEventMouseMotion> &p_ev_mouse_motion) const; Vector3 _get_instance_position(const Point2 &p_pos) const; - static AABB _calculate_spatial_bounds(const Node3D *p_parent, bool p_exclude_toplevel_transform = true); + static AABB _calculate_spatial_bounds(const Node3D *p_parent, bool p_exclude_top_level_transform = true); void _create_preview(const Vector<String> &files) const; void _remove_preview(); bool _cyclical_dependency_exists(const String &p_target_scene_path, Node *p_desired_node); @@ -600,11 +600,13 @@ private: bool grid_enable[3]; //should be always visible if true bool grid_enabled; - Ref<ArrayMesh> move_gizmo[3], move_plane_gizmo[3], rotate_gizmo[3], scale_gizmo[3], scale_plane_gizmo[3]; + Ref<ArrayMesh> move_gizmo[3], move_plane_gizmo[3], rotate_gizmo[4], scale_gizmo[3], scale_plane_gizmo[3]; Ref<StandardMaterial3D> gizmo_color[3]; Ref<StandardMaterial3D> plane_gizmo_color[3]; + Ref<ShaderMaterial> rotate_gizmo_color[3]; Ref<StandardMaterial3D> gizmo_color_hl[3]; Ref<StandardMaterial3D> plane_gizmo_color_hl[3]; + Ref<ShaderMaterial> rotate_gizmo_color_hl[3]; int over_gizmo_handle; float snap_translate_value; diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index 274c64263f..684d8f0f10 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -3109,6 +3109,7 @@ Vector2 TileSetEditor::snap_point(const Vector2 &point) { anchor += tileset->tile_get_region(get_current_tile()).position; anchor += WORKSPACE_MARGIN; Rect2 region(anchor, tile_size); + Rect2 tile_region(tileset->tile_get_region(get_current_tile()).position + WORKSPACE_MARGIN, tileset->tile_get_region(get_current_tile()).size); if (tileset->tile_get_tile_mode(get_current_tile()) == TileSet::SINGLE_TILE) { region.position = tileset->tile_get_region(get_current_tile()).position + WORKSPACE_MARGIN; region.size = tileset->tile_get_region(get_current_tile()).size; @@ -3118,6 +3119,7 @@ Vector2 TileSetEditor::snap_point(const Vector2 &point) { p.x = Math::snap_scalar_separation(snap_offset.x, snap_step.x, p.x, snap_separation.x); p.y = Math::snap_scalar_separation(snap_offset.y, snap_step.y, p.y, snap_separation.y); } + if (tools[SHAPE_KEEP_INSIDE_TILE]->is_pressed()) { if (p.x < region.position.x) { p.x = region.position.x; @@ -3132,6 +3134,20 @@ Vector2 TileSetEditor::snap_point(const Vector2 &point) { p.y = region.position.y + region.size.y; } } + + if (p.x < tile_region.position.x) { + p.x = tile_region.position.x; + } + if (p.y < tile_region.position.y) { + p.y = tile_region.position.y; + } + if (p.x > (tile_region.position.x + tile_region.size.x)) { + p.x = (tile_region.position.x + tile_region.size.x); + } + if (p.y > (tile_region.position.y + tile_region.size.y)) { + p.y = (tile_region.position.y + tile_region.size.y); + } + return p; } diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index e34f0855b2..1651de4048 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -47,6 +47,27 @@ #include "servers/display_server.h" #include "servers/rendering/shader_types.h" +struct FloatConstantDef { + String name; + float value; + String desc; +}; + +static FloatConstantDef float_constant_defs[] = { + { "E", Math_E, TTR("E constant (2.718282). Represents the base of the natural logarithm.") }, + { "Epsilon", CMP_EPSILON, TTR("Epsilon constant (0.00001). Smallest possible scalar number.") }, + { "Phi", 1.618034f, TTR("Phi constant (1.618034). Golden ratio.") }, + { "Pi/4", Math_PI / 4, TTR("Pi/4 constant (0.785398) or 45 degrees.") }, + { "Pi/2", Math_PI / 2, TTR("Pi/2 constant (1.570796) or 90 degrees.") }, + { "Pi", Math_PI, TTR("Pi constant (3.141593) or 180 degrees.") }, + { "Tau", Math_TAU, TTR("Tau constant (6.283185) or 360 degrees.") }, + { "Sqrt2", Math_SQRT2, TTR("Sqrt2 constant (1.414214). Square root of 2.") } +}; + +const int MAX_FLOAT_CONST_DEFS = sizeof(float_constant_defs) / sizeof(FloatConstantDef); + +/////////////////// + Control *VisualShaderNodePlugin::create_editor(const Ref<Resource> &p_parent_resource, const Ref<VisualShaderNode> &p_node) { if (get_script_instance()) { return get_script_instance()->call("create_editor", p_parent_resource, p_node); @@ -82,9 +103,11 @@ void VisualShaderGraphPlugin::_bind_methods() { ClassDB::bind_method("set_node_position", &VisualShaderGraphPlugin::set_node_position); ClassDB::bind_method("set_node_size", &VisualShaderGraphPlugin::set_node_size); ClassDB::bind_method("show_port_preview", &VisualShaderGraphPlugin::show_port_preview); - ClassDB::bind_method("update_property_editor", &VisualShaderGraphPlugin::update_property_editor); - ClassDB::bind_method("update_property_editor_deferred", &VisualShaderGraphPlugin::update_property_editor_deferred); + ClassDB::bind_method("update_node", &VisualShaderGraphPlugin::update_node); + ClassDB::bind_method("update_node_deferred", &VisualShaderGraphPlugin::update_node_deferred); ClassDB::bind_method("set_input_port_default_value", &VisualShaderGraphPlugin::set_input_port_default_value); + ClassDB::bind_method("set_uniform_name", &VisualShaderGraphPlugin::set_uniform_name); + ClassDB::bind_method("update_constant", &VisualShaderGraphPlugin::update_constant); } void VisualShaderGraphPlugin::register_shader(VisualShader *p_shader) { @@ -134,11 +157,11 @@ void VisualShaderGraphPlugin::show_port_preview(VisualShader::Type p_type, int p } } -void VisualShaderGraphPlugin::update_property_editor_deferred(VisualShader::Type p_type, int p_node_id) { - call_deferred("update_property_editor", p_type, p_node_id); +void VisualShaderGraphPlugin::update_node_deferred(VisualShader::Type p_type, int p_node_id) { + call_deferred("update_node", p_type, p_node_id); } -void VisualShaderGraphPlugin::update_property_editor(VisualShader::Type p_type, int p_node_id) { +void VisualShaderGraphPlugin::update_node(VisualShader::Type p_type, int p_node_id) { if (p_type != visual_shader->get_shader_type() || !links.has(p_node_id)) { return; } @@ -176,10 +199,58 @@ void VisualShaderGraphPlugin::set_input_port_default_value(VisualShader::Type p_ } } +void VisualShaderGraphPlugin::set_uniform_name(VisualShader::Type p_type, int p_node_id, const String &p_name) { + if (visual_shader->get_shader_type() == p_type && links.has(p_node_id) && links[p_node_id].uniform_name != nullptr) { + links[p_node_id].uniform_name->set_text(p_name); + } +} + +int VisualShaderGraphPlugin::get_constant_index(float p_constant) const { + for (int i = 0; i < MAX_FLOAT_CONST_DEFS; i++) { + if (Math::is_equal_approx(p_constant, float_constant_defs[i].value)) { + return i + 1; + } + } + return 0; +} + +void VisualShaderGraphPlugin::update_constant(VisualShader::Type p_type, int p_node_id) { + if (p_type != visual_shader->get_shader_type() || !links.has(p_node_id) || !links[p_node_id].const_op) { + return; + } + VisualShaderNodeFloatConstant *float_const = Object::cast_to<VisualShaderNodeFloatConstant>(links[p_node_id].visual_node); + if (!float_const) { + return; + } + links[p_node_id].const_op->select(get_constant_index(float_const->get_constant())); + links[p_node_id].graph_node->set_size(Size2(-1, -1)); +} + +void VisualShaderGraphPlugin::update_node_size(int p_node_id) { + if (!links.has(p_node_id)) { + return; + } + links[p_node_id].graph_node->set_size(Size2(-1, -1)); +} + void VisualShaderGraphPlugin::register_default_input_button(int p_node_id, int p_port_id, Button *p_button) { links[p_node_id].input_ports.insert(p_port_id, { p_button }); } +void VisualShaderGraphPlugin::register_constant_option_btn(int p_node_id, OptionButton *p_button) { + links[p_node_id].const_op = p_button; +} + +void VisualShaderGraphPlugin::update_uniform_refs() { + for (Map<int, Link>::Element *E = links.front(); E; E = E->next()) { + VisualShaderNodeUniformRef *ref = Object::cast_to<VisualShaderNodeUniformRef>(E->get().visual_node); + if (ref) { + remove_node(E->get().type, E->key()); + add_node(E->get().type, E->key()); + } + } +} + VisualShader::Type VisualShaderGraphPlugin::get_shader_type() const { return visual_shader->get_shader_type(); } @@ -213,13 +284,17 @@ void VisualShaderGraphPlugin::make_dirty(bool p_enabled) { } void VisualShaderGraphPlugin::register_link(VisualShader::Type p_type, int p_id, VisualShaderNode *p_visual_node, GraphNode *p_graph_node) { - links.insert(p_id, { p_type, p_visual_node, p_graph_node, p_visual_node->get_output_port_for_preview() != -1, -1, Map<int, InputPort>(), Map<int, Port>(), nullptr }); + links.insert(p_id, { p_type, p_visual_node, p_graph_node, p_visual_node->get_output_port_for_preview() != -1, -1, Map<int, InputPort>(), Map<int, Port>(), nullptr, nullptr, nullptr }); } void VisualShaderGraphPlugin::register_output_port(int p_node_id, int p_port, TextureButton *p_button) { links[p_node_id].output_ports.insert(p_port, { p_button }); } +void VisualShaderGraphPlugin::register_uniform_name(int p_node_id, LineEdit *p_uniform_name) { + links[p_node_id].uniform_name = p_uniform_name; +} + void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) { if (p_type != visual_shader->get_shader_type()) { return; @@ -280,43 +355,22 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) { } Ref<VisualShaderNodeUniform> uniform = vsnode; - - if (uniform.is_valid()) { - VisualShaderEditor::get_singleton()->call_deferred("_update_uniforms"); - } - - Ref<VisualShaderNodeFloatUniform> float_uniform = vsnode; - Ref<VisualShaderNodeIntUniform> int_uniform = vsnode; - Ref<VisualShaderNodeVec3Uniform> vec3_uniform = vsnode; - Ref<VisualShaderNodeColorUniform> color_uniform = vsnode; - Ref<VisualShaderNodeBooleanUniform> bool_uniform = vsnode; - Ref<VisualShaderNodeTransformUniform> transform_uniform = vsnode; if (uniform.is_valid()) { VisualShaderEditor::get_singleton()->graph->add_child(node); VisualShaderEditor::get_singleton()->_update_created_node(node); LineEdit *uniform_name = memnew(LineEdit); + register_uniform_name(p_id, uniform_name); uniform_name->set_text(uniform->get_uniform_name()); node->add_child(uniform_name); - uniform_name->connect("text_entered", callable_mp(VisualShaderEditor::get_singleton(), &VisualShaderEditor::_line_edit_changed), varray(uniform_name, p_id)); - uniform_name->connect("focus_exited", callable_mp(VisualShaderEditor::get_singleton(), &VisualShaderEditor::_line_edit_focus_out), varray(uniform_name, p_id)); - - String error = vsnode->get_warning(visual_shader->get_mode(), p_type); - if (error != String()) { - offset = memnew(Control); - offset->set_custom_minimum_size(Size2(0, 4 * EDSCALE)); - node->add_child(offset); - Label *error_label = memnew(Label); - error_label->add_theme_color_override("font_color", VisualShaderEditor::get_singleton()->get_theme_color("error_color", "Editor")); - error_label->set_text(error); - node->add_child(error_label); - } + uniform_name->connect("text_entered", callable_mp(VisualShaderEditor::get_singleton(), &VisualShaderEditor::_uniform_line_edit_changed), varray(p_id)); + uniform_name->connect("focus_exited", callable_mp(VisualShaderEditor::get_singleton(), &VisualShaderEditor::_uniform_line_edit_focus_out), varray(uniform_name, p_id)); if (vsnode->get_input_port_count() == 0 && vsnode->get_output_port_count() == 1 && vsnode->get_output_port_name(0) == "") { //shortcut VisualShaderNode::PortType port_right = vsnode->get_output_port_type(0); node->set_slot(0, false, VisualShaderNode::PORT_TYPE_SCALAR, Color(), true, port_right, type_color[port_right]); - if (!float_uniform.is_valid() && !int_uniform.is_valid() && !vec3_uniform.is_valid() && !color_uniform.is_valid() && !bool_uniform.is_valid() && !transform_uniform.is_valid()) { + if (!vsnode->is_use_prop_slots()) { return; } } @@ -330,20 +384,36 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) { vsnode->remove_meta("id"); vsnode->remove_meta("shader_type"); if (custom_editor) { + if (vsnode->is_show_prop_names()) { + custom_editor->call_deferred("_show_prop_names", true); + } break; } } - if (custom_editor && !float_uniform.is_valid() && !int_uniform.is_valid() && !vec3_uniform.is_valid() && !bool_uniform.is_valid() && !transform_uniform.is_valid() && vsnode->get_output_port_count() > 0 && vsnode->get_output_port_name(0) == "" && (vsnode->get_input_port_count() == 0 || vsnode->get_input_port_name(0) == "")) { + Ref<VisualShaderNodeFloatConstant> float_const = vsnode; + if (float_const.is_valid()) { + HBoxContainer *hbox = memnew(HBoxContainer); + + hbox->add_child(custom_editor); + OptionButton *btn = memnew(OptionButton); + hbox->add_child(btn); + register_constant_option_btn(p_id, btn); + btn->add_item(""); + for (int i = 0; i < MAX_FLOAT_CONST_DEFS; i++) { + btn->add_item(float_constant_defs[i].name); + } + btn->select(get_constant_index(float_const->get_constant())); + btn->connect("item_selected", callable_mp(VisualShaderEditor::get_singleton(), &VisualShaderEditor::_float_constant_selected), varray(p_id)); + custom_editor = hbox; + } + + if (custom_editor && !vsnode->is_use_prop_slots() && vsnode->get_output_port_count() > 0 && vsnode->get_output_port_name(0) == "" && (vsnode->get_input_port_count() == 0 || vsnode->get_input_port_name(0) == "")) { //will be embedded in first port } else if (custom_editor) { port_offset++; node->add_child(custom_editor); - if (color_uniform.is_valid()) { - custom_editor->call_deferred("_show_prop_names", true); - } - if (float_uniform.is_valid() || int_uniform.is_valid() || vec3_uniform.is_valid() || bool_uniform.is_valid() || transform_uniform.is_valid()) { - custom_editor->call_deferred("_show_prop_names", true); + if (vsnode->is_use_prop_slots()) { return; } custom_editor = nullptr; @@ -590,19 +660,13 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) { VisualShaderEditor::get_singleton()->graph->add_child(node); VisualShaderEditor::get_singleton()->_update_created_node(node); if (is_group) { - call_deferred("_set_node_size", (int)p_type, p_id, size); + VisualShaderEditor::get_singleton()->call_deferred("_set_node_size", (int)p_type, p_id, size); } } } void VisualShaderGraphPlugin::remove_node(VisualShader::Type p_type, int p_id) { if (visual_shader->get_shader_type() == p_type && links.has(p_id)) { - Ref<VisualShaderNodeUniform> uniform = Ref<VisualShaderNode>(links[p_id].visual_node); - - if (uniform.is_valid()) { - VisualShaderEditor::get_singleton()->call_deferred("_update_uniforms"); - } - links[p_id].graph_node->get_parent()->remove_child(links[p_id].graph_node); memdelete(links[p_id].graph_node); links.erase(p_id); @@ -1015,7 +1079,7 @@ void VisualShaderEditor::_update_created_node(GraphNode *node) { } } -void VisualShaderEditor::_update_uniforms() { +void VisualShaderEditor::_update_uniforms(bool p_update_refs) { VisualShaderNodeUniformRef::clear_uniforms(); for (int t = 0; t < VisualShader::TYPE_MAX; t++) { @@ -1052,6 +1116,30 @@ void VisualShaderEditor::_update_uniforms() { } } } + if (p_update_refs) { + graph_plugin->update_uniform_refs(); + } +} + +void VisualShaderEditor::_update_uniform_refs(Set<String> &p_deleted_names) { + for (int i = 0; i < VisualShader::TYPE_MAX; i++) { + VisualShader::Type type = VisualShader::Type(i); + + Vector<int> nodes = visual_shader->get_node_list(type); + for (int j = 0; j < nodes.size(); j++) { + if (j > 0) { + Ref<VisualShaderNodeUniformRef> ref = visual_shader->get_node(type, nodes[j]); + if (ref.is_valid()) { + if (p_deleted_names.has(ref->get_uniform_name())) { + undo_redo->add_do_method(ref.ptr(), "set_uniform_name", "[None]"); + undo_redo->add_undo_method(ref.ptr(), "set_uniform_name", ref->get_uniform_name()); + undo_redo->add_do_method(graph_plugin.ptr(), "update_node", VisualShader::Type(i), nodes[j]); + undo_redo->add_undo_method(graph_plugin.ptr(), "update_node", VisualShader::Type(i), nodes[j]); + } + } + } + } + } } void VisualShaderEditor::_update_graph() { @@ -1084,7 +1172,7 @@ void VisualShaderEditor::_update_graph() { Vector<int> nodes = visual_shader->get_node_list(type); - _update_uniforms(); + _update_uniforms(false); graph_plugin->clear_links(); graph_plugin->make_dirty(true); @@ -1125,10 +1213,8 @@ void VisualShaderEditor::_add_input_port(int p_node, int p_port, int p_port_type undo_redo->create_action(TTR("Add input port")); undo_redo->add_do_method(node.ptr(), "add_input_port", p_port, p_port_type, p_name); undo_redo->add_undo_method(node.ptr(), "remove_input_port", p_port); - undo_redo->add_do_method(this, "_update_graph"); - undo_redo->add_undo_method(this, "_update_graph"); - undo_redo->add_do_method(this, "_rebuild"); - undo_redo->add_undo_method(this, "_rebuild"); + undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type, p_node); + undo_redo->add_undo_method(graph_plugin.ptr(), "update_node", type, p_node); undo_redo->commit_action(); } @@ -1142,10 +1228,8 @@ void VisualShaderEditor::_add_output_port(int p_node, int p_port, int p_port_typ undo_redo->create_action(TTR("Add output port")); undo_redo->add_do_method(node.ptr(), "add_output_port", p_port, p_port_type, p_name); undo_redo->add_undo_method(node.ptr(), "remove_output_port", p_port); - undo_redo->add_do_method(this, "_update_graph"); - undo_redo->add_undo_method(this, "_update_graph"); - undo_redo->add_do_method(this, "_rebuild"); - undo_redo->add_undo_method(this, "_rebuild"); + undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type, p_node); + undo_redo->add_undo_method(graph_plugin.ptr(), "update_node", type, p_node); undo_redo->commit_action(); } @@ -1159,10 +1243,8 @@ void VisualShaderEditor::_change_input_port_type(int p_type, int p_node, int p_p undo_redo->create_action(TTR("Change input port type")); undo_redo->add_do_method(node.ptr(), "set_input_port_type", p_port, p_type); undo_redo->add_undo_method(node.ptr(), "set_input_port_type", p_port, node->get_input_port_type(p_port)); - undo_redo->add_do_method(this, "_update_graph"); - undo_redo->add_undo_method(this, "_update_graph"); - undo_redo->add_do_method(this, "_rebuild"); - undo_redo->add_undo_method(this, "_rebuild"); + undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type, p_node); + undo_redo->add_undo_method(graph_plugin.ptr(), "update_node", type, p_node); undo_redo->commit_action(); } @@ -1176,10 +1258,8 @@ void VisualShaderEditor::_change_output_port_type(int p_type, int p_node, int p_ undo_redo->create_action(TTR("Change output port type")); undo_redo->add_do_method(node.ptr(), "set_output_port_type", p_port, p_type); undo_redo->add_undo_method(node.ptr(), "set_output_port_type", p_port, node->get_output_port_type(p_port)); - undo_redo->add_do_method(this, "_update_graph"); - undo_redo->add_undo_method(this, "_update_graph"); - undo_redo->add_do_method(this, "_rebuild"); - undo_redo->add_undo_method(this, "_rebuild"); + undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type, p_node); + undo_redo->add_undo_method(graph_plugin.ptr(), "update_node", type, p_node); undo_redo->commit_action(); } @@ -1192,8 +1272,8 @@ void VisualShaderEditor::_change_input_port_name(const String &p_text, Object *l undo_redo->create_action(TTR("Change input port name")); undo_redo->add_do_method(node.ptr(), "set_input_port_name", p_port_id, p_text); undo_redo->add_undo_method(node.ptr(), "set_input_port_name", p_port_id, node->get_input_port_name(p_port_id)); - undo_redo->add_do_method(this, "_rebuild"); - undo_redo->add_undo_method(this, "_rebuild"); + undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type, p_node_id); + undo_redo->add_undo_method(graph_plugin.ptr(), "update_node", type, p_node_id); undo_redo->commit_action(); } @@ -1206,8 +1286,8 @@ void VisualShaderEditor::_change_output_port_name(const String &p_text, Object * undo_redo->create_action(TTR("Change output port name")); undo_redo->add_do_method(node.ptr(), "set_output_port_name", p_port_id, p_text); undo_redo->add_undo_method(node.ptr(), "set_output_port_name", p_port_id, node->get_output_port_name(p_port_id)); - undo_redo->add_do_method(this, "_rebuild"); - undo_redo->add_undo_method(this, "_rebuild"); + undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type, p_node_id); + undo_redo->add_undo_method(graph_plugin.ptr(), "update_node", type, p_node_id); undo_redo->commit_action(); } @@ -1232,12 +1312,21 @@ void VisualShaderEditor::_remove_input_port(int p_node, int p_port) { if (to_port == p_port) { undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port); undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, from_node, from_port, to_node, to_port); + + undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port); + undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port, to_node, to_port); } else if (to_port > p_port) { undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port); undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, from_node, from_port, to_node, to_port); + undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port); + undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port, to_node, to_port); + undo_redo->add_do_method(visual_shader.ptr(), "connect_nodes_forced", type, from_node, from_port, to_node, to_port - 1); undo_redo->add_undo_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port - 1); + + undo_redo->add_do_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port, to_node, to_port - 1); + undo_redo->add_undo_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port - 1); } } } @@ -1245,11 +1334,8 @@ void VisualShaderEditor::_remove_input_port(int p_node, int p_port) { undo_redo->add_do_method(node.ptr(), "remove_input_port", p_port); undo_redo->add_undo_method(node.ptr(), "add_input_port", p_port, (int)node->get_input_port_type(p_port), node->get_input_port_name(p_port)); - undo_redo->add_do_method(this, "_update_graph"); - undo_redo->add_undo_method(this, "_update_graph"); - - undo_redo->add_do_method(this, "_rebuild"); - undo_redo->add_undo_method(this, "_rebuild"); + undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type, p_node); + undo_redo->add_undo_method(graph_plugin.ptr(), "update_node", type, p_node); undo_redo->commit_action(); } @@ -1275,12 +1361,21 @@ void VisualShaderEditor::_remove_output_port(int p_node, int p_port) { if (from_port == p_port) { undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port); undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, from_node, from_port, to_node, to_port); + + undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port); + undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port, to_node, to_port); } else if (from_port > p_port) { undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port); undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, from_node, from_port, to_node, to_port); + undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port); + undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port, to_node, to_port); + undo_redo->add_do_method(visual_shader.ptr(), "connect_nodes_forced", type, from_node, from_port - 1, to_node, to_port); undo_redo->add_undo_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port - 1, to_node, to_port); + + undo_redo->add_do_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port - 1, to_node, to_port); + undo_redo->add_undo_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port - 1, to_node, to_port); } } } @@ -1288,11 +1383,8 @@ void VisualShaderEditor::_remove_output_port(int p_node, int p_port) { undo_redo->add_do_method(node.ptr(), "remove_output_port", p_port); undo_redo->add_undo_method(node.ptr(), "add_output_port", p_port, (int)node->get_output_port_type(p_port), node->get_output_port_name(p_port)); - undo_redo->add_do_method(this, "_update_graph"); - undo_redo->add_undo_method(this, "_update_graph"); - - undo_redo->add_do_method(this, "_rebuild"); - undo_redo->add_undo_method(this, "_rebuild"); + undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type, p_node); + undo_redo->add_undo_method(graph_plugin.ptr(), "update_node", type, p_node); undo_redo->commit_action(); } @@ -1313,18 +1405,9 @@ void VisualShaderEditor::_expression_focus_out(Object *code_edit, int p_node) { undo_redo->create_action(TTR("Set expression")); undo_redo->add_do_method(node.ptr(), "set_expression", expression_box->get_text()); undo_redo->add_undo_method(node.ptr(), "set_expression", node->get_expression()); - undo_redo->add_do_method(this, "_rebuild"); - undo_redo->add_undo_method(this, "_rebuild"); undo_redo->commit_action(); } -void VisualShaderEditor::_rebuild() { - if (visual_shader != nullptr) { - EditorNode::get_singleton()->get_log()->clear(); - visual_shader->rebuild(); - } -} - void VisualShaderEditor::_set_node_size(int p_type, int p_node, const Vector2 &p_size) { VisualShader::Type type = get_current_shader_type(); Ref<VisualShaderNode> node = visual_shader->get_node(type, p_node); @@ -1403,7 +1486,7 @@ void VisualShaderEditor::_preview_select_port(int p_node, int p_port) { undo_redo->commit_action(); } -void VisualShaderEditor::_line_edit_changed(const String &p_text, Object *line_edit, int p_node_id) { +void VisualShaderEditor::_uniform_line_edit_changed(const String &p_text, int p_node_id) { VisualShader::Type type = get_current_shader_type(); Ref<VisualShaderNodeUniform> node = visual_shader->get_node(type, p_node_id); @@ -1411,21 +1494,28 @@ void VisualShaderEditor::_line_edit_changed(const String &p_text, Object *line_e String validated_name = visual_shader->validate_uniform_name(p_text, node); - updating = true; + if (validated_name == node->get_uniform_name()) { + return; + } + undo_redo->create_action(TTR("Set Uniform Name")); undo_redo->add_do_method(node.ptr(), "set_uniform_name", validated_name); undo_redo->add_undo_method(node.ptr(), "set_uniform_name", node->get_uniform_name()); - undo_redo->add_do_method(this, "_update_graph"); - undo_redo->add_undo_method(this, "_update_graph"); - undo_redo->commit_action(); - updating = false; + undo_redo->add_do_method(graph_plugin.ptr(), "set_uniform_name", type, p_node_id, validated_name); + undo_redo->add_undo_method(graph_plugin.ptr(), "set_uniform_name", type, p_node_id, node->get_uniform_name()); + + undo_redo->add_do_method(this, "_update_uniforms", true); + undo_redo->add_undo_method(this, "_update_uniforms", true); + + Set<String> changed_names; + changed_names.insert(node->get_uniform_name()); + _update_uniform_refs(changed_names); - Object::cast_to<LineEdit>(line_edit)->set_text(validated_name); + undo_redo->commit_action(); } -void VisualShaderEditor::_line_edit_focus_out(Object *line_edit, int p_node_id) { - String text = Object::cast_to<LineEdit>(line_edit)->get_text(); - _line_edit_changed(text, line_edit, p_node_id); +void VisualShaderEditor::_uniform_line_edit_focus_out(Object *line_edit, int p_node_id) { + _uniform_line_edit_changed(Object::cast_to<LineEdit>(line_edit)->get_text(), p_node_id); } void VisualShaderEditor::_port_name_focus_out(Object *line_edit, int p_node_id, int p_port_id, bool p_output) { @@ -1527,9 +1617,24 @@ void VisualShaderEditor::_add_custom_node(const String &p_path) { } } -void VisualShaderEditor::_add_texture_node(const String &p_path) { - VisualShaderNodeTexture *texture = (VisualShaderNodeTexture *)_add_node(texture_node_option_idx, -1); - texture->set_texture(ResourceLoader::load(p_path)); +void VisualShaderEditor::_add_cubemap_node(const String &p_path) { + VisualShaderNodeCubemap *cubemap = (VisualShaderNodeCubemap *)_add_node(cubemap_node_option_idx, -1); + cubemap->set_cube_map(ResourceLoader::load(p_path)); +} + +void VisualShaderEditor::_add_texture2d_node(const String &p_path) { + VisualShaderNodeTexture *texture2d = (VisualShaderNodeTexture *)_add_node(texture2d_node_option_idx, -1); + texture2d->set_texture(ResourceLoader::load(p_path)); +} + +void VisualShaderEditor::_add_texture2d_array_node(const String &p_path) { + VisualShaderNodeTexture2DArray *texture2d_array = (VisualShaderNodeTexture2DArray *)_add_node(texture2d_array_node_option_idx, -1); + texture2d_array->set_texture_array(ResourceLoader::load(p_path)); +} + +void VisualShaderEditor::_add_texture3d_node(const String &p_path) { + VisualShaderNodeTexture3D *texture3d = (VisualShaderNodeTexture3D *)_add_node(texture3d_node_option_idx, -1); + texture3d->set_texture(ResourceLoader::load(p_path)); } VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) { @@ -1639,7 +1744,7 @@ VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) { VisualShaderNodeMultiplyAdd *fmaFunc = Object::cast_to<VisualShaderNodeMultiplyAdd>(vsn); if (fmaFunc) { - fmaFunc->set_type((VisualShaderNodeMultiplyAdd::Type)p_op_idx); + fmaFunc->set_op_type((VisualShaderNodeMultiplyAdd::OpType)p_op_idx); } } @@ -1704,18 +1809,38 @@ VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) { } } + VisualShaderNodeUniform *uniform = Object::cast_to<VisualShaderNodeUniform>(vsnode.ptr()); + if (uniform) { + undo_redo->add_do_method(this, "_update_uniforms", true); + undo_redo->add_undo_method(this, "_update_uniforms", true); + } + undo_redo->commit_action(); return vsnode.ptr(); } void VisualShaderEditor::_node_dragged(const Vector2 &p_from, const Vector2 &p_to, int p_node) { VisualShader::Type type = get_current_shader_type(); + drag_buffer.push_back({ type, p_node, p_from, p_to }); + if (!drag_dirty) { + call_deferred("_nodes_dragged"); + } + drag_dirty = true; +} - undo_redo->create_action(TTR("Node Moved")); - undo_redo->add_do_method(visual_shader.ptr(), "set_node_position", type, p_node, p_to); - undo_redo->add_undo_method(visual_shader.ptr(), "set_node_position", type, p_node, p_from); - undo_redo->add_do_method(graph_plugin.ptr(), "set_node_position", type, p_node, p_to); - undo_redo->add_undo_method(graph_plugin.ptr(), "set_node_position", type, p_node, p_from); +void VisualShaderEditor::_nodes_dragged() { + drag_dirty = false; + + undo_redo->create_action(TTR("Node(s) Moved")); + + for (List<DragOp>::Element *E = drag_buffer.front(); E; E = E->next()) { + undo_redo->add_do_method(visual_shader.ptr(), "set_node_position", E->get().type, E->get().node, E->get().to); + undo_redo->add_undo_method(visual_shader.ptr(), "set_node_position", E->get().type, E->get().node, E->get().from); + undo_redo->add_do_method(graph_plugin.ptr(), "set_node_position", E->get().type, E->get().node, E->get().to); + undo_redo->add_undo_method(graph_plugin.ptr(), "set_node_position", E->get().type, E->get().node, E->get().from); + } + + drag_buffer.clear(); undo_redo->commit_action(); } @@ -1758,14 +1883,12 @@ void VisualShaderEditor::_disconnection_request(const String &p_from, int p_from int from = p_from.to_int(); int to = p_to.to_int(); - //updating = true; seems graph edit can handle this, no need to protect undo_redo->create_action(TTR("Nodes Disconnected")); undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, from, p_from_index, to, p_to_index); undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes", type, from, p_from_index, to, p_to_index); undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, from, p_from_index, to, p_to_index); undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, from, p_from_index, to, p_to_index); undo_redo->commit_action(); - //updating = false; } void VisualShaderEditor::_connection_to_empty(const String &p_from, int p_from_slot, const Vector2 &p_release_position) { @@ -1823,6 +1946,18 @@ void VisualShaderEditor::_delete_request(int which) { } // delete a node from the graph undo_redo->add_do_method(graph_plugin.ptr(), "remove_node", type, which); + + VisualShaderNodeUniform *uniform = Object::cast_to<VisualShaderNodeUniform>(node.ptr()); + if (uniform) { + undo_redo->add_do_method(this, "_update_uniforms", true); + undo_redo->add_undo_method(this, "_update_uniforms", true); + + Set<String> uniform_names; + uniform_names.insert(uniform->get_uniform_name()); + + _update_uniform_refs(uniform_names); + } + undo_redo->commit_action(); } @@ -2222,6 +2357,8 @@ void VisualShaderEditor::_delete_nodes() { } } + Set<String> uniform_names; + for (List<int>::Element *F = to_erase.front(); F; F = F->next()) { Ref<VisualShaderNode> node = visual_shader->get_node(type, F->get()); @@ -2245,6 +2382,11 @@ void VisualShaderEditor::_delete_nodes() { if (expression) { undo_redo->add_undo_method(expression, "set_expression", expression->get_expression()); } + + VisualShaderNodeUniform *uniform = Object::cast_to<VisualShaderNodeUniform>(node.ptr()); + if (uniform) { + uniform_names.insert(uniform->get_uniform_name()); + } } List<VisualShader::Connection> used_conns; @@ -2272,6 +2414,14 @@ void VisualShaderEditor::_delete_nodes() { undo_redo->add_do_method(graph_plugin.ptr(), "remove_node", type, F->get()); } + // update uniform refs if any uniform has been deleted + if (uniform_names.size() > 0) { + undo_redo->add_do_method(this, "_update_uniforms", true); + undo_redo->add_undo_method(this, "_update_uniforms", true); + + _update_uniform_refs(uniform_names); + } + undo_redo->commit_action(); } @@ -2281,37 +2431,49 @@ void VisualShaderEditor::_mode_selected(int p_id) { _update_graph(); } -void VisualShaderEditor::_input_select_item(Ref<VisualShaderNodeInput> input, String name) { - String prev_name = input->get_input_name(); +void VisualShaderEditor::_input_select_item(Ref<VisualShaderNodeInput> p_input, String p_name) { + String prev_name = p_input->get_input_name(); - if (name == prev_name) { + if (p_name == prev_name) { return; } - bool type_changed = input->get_input_type_by_name(name) != input->get_input_type_by_name(prev_name); + bool type_changed = p_input->get_input_type_by_name(p_name) != p_input->get_input_type_by_name(prev_name); UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo(); undo_redo->create_action(TTR("Visual Shader Input Type Changed")); - undo_redo->add_do_method(input.ptr(), "set_input_name", name); - undo_redo->add_undo_method(input.ptr(), "set_input_name", prev_name); - - if (type_changed) { - //restore connections if type changed - VisualShader::Type type = get_current_shader_type(); - int id = visual_shader->find_node_id(type, input); - List<VisualShader::Connection> conns; - visual_shader->get_node_connections(type, &conns); - for (List<VisualShader::Connection>::Element *E = conns.front(); E; E = E->next()) { - if (E->get().from_node == id) { - undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes", type, E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); + undo_redo->add_do_method(p_input.ptr(), "set_input_name", p_name); + undo_redo->add_undo_method(p_input.ptr(), "set_input_name", prev_name); + + // update output port + for (int type_id = 0; type_id < VisualShader::TYPE_MAX; type_id++) { + VisualShader::Type type = VisualShader::Type(type_id); + int id = visual_shader->find_node_id(type, p_input); + if (id != VisualShader::NODE_ID_INVALID) { + if (type_changed) { + List<VisualShader::Connection> conns; + visual_shader->get_node_connections(type, &conns); + for (List<VisualShader::Connection>::Element *E = conns.front(); E; E = E->next()) { + if (E->get().from_node == id) { + if (visual_shader->is_port_types_compatible(p_input->get_input_type_by_name(p_name), visual_shader->get_node(type, E->get().to_node)->get_input_port_type(E->get().to_port))) { + undo_redo->add_do_method(visual_shader.ptr(), "connect_nodes", type, E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); + undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes", type, E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); + continue; + } + undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); + undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes", type, E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); + undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); + undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); + } + } } + undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type_id, id); + undo_redo->add_undo_method(graph_plugin.ptr(), "update_node", type_id, id); + break; } } - undo_redo->add_do_method(VisualShaderEditor::get_singleton(), "_update_graph"); - undo_redo->add_undo_method(VisualShaderEditor::get_singleton(), "_update_graph"); - undo_redo->commit_action(); } @@ -2330,23 +2492,56 @@ void VisualShaderEditor::_uniform_select_item(Ref<VisualShaderNodeUniformRef> p_ undo_redo->add_do_method(p_uniform_ref.ptr(), "set_uniform_name", p_name); undo_redo->add_undo_method(p_uniform_ref.ptr(), "set_uniform_name", prev_name); - if (type_changed) { - //restore connections if type changed - VisualShader::Type type = get_current_shader_type(); + // update output port + for (int type_id = 0; type_id < VisualShader::TYPE_MAX; type_id++) { + VisualShader::Type type = VisualShader::Type(type_id); int id = visual_shader->find_node_id(type, p_uniform_ref); - List<VisualShader::Connection> conns; - visual_shader->get_node_connections(type, &conns); - for (List<VisualShader::Connection>::Element *E = conns.front(); E; E = E->next()) { - if (E->get().from_node == id) { - undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); - undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes", type, E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); + if (id != VisualShader::NODE_ID_INVALID) { + if (type_changed) { + List<VisualShader::Connection> conns; + visual_shader->get_node_connections(type, &conns); + for (List<VisualShader::Connection>::Element *E = conns.front(); E; E = E->next()) { + if (E->get().from_node == id) { + if (visual_shader->is_port_types_compatible(p_uniform_ref->get_uniform_type_by_name(p_name), visual_shader->get_node(type, E->get().to_node)->get_input_port_type(E->get().to_port))) { + continue; + } + undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); + undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes", type, E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); + undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); + undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); + } + } } + undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type_id, id); + undo_redo->add_undo_method(graph_plugin.ptr(), "update_node", type_id, id); + break; } } - undo_redo->add_do_method(VisualShaderEditor::get_singleton(), "_update_graph"); - undo_redo->add_undo_method(VisualShaderEditor::get_singleton(), "_update_graph"); + undo_redo->commit_action(); +} + +void VisualShaderEditor::_float_constant_selected(int p_index, int p_node) { + if (p_index == 0) { + graph_plugin->update_node_size(p_node); + return; + } + --p_index; + + ERR_FAIL_INDEX(p_index, MAX_FLOAT_CONST_DEFS); + + VisualShader::Type type = get_current_shader_type(); + Ref<VisualShaderNodeFloatConstant> node = visual_shader->get_node(type, p_node); + if (!node.is_valid()) { + return; + } + + undo_redo->create_action(TTR("Set constant")); + undo_redo->add_do_method(node.ptr(), "set_constant", float_constant_defs[p_index].value); + undo_redo->add_undo_method(node.ptr(), "set_constant", node->get_constant()); + undo_redo->add_do_method(graph_plugin.ptr(), "update_constant", type, p_node); + undo_redo->add_undo_method(graph_plugin.ptr(), "update_constant", type, p_node); undo_redo->commit_action(); } @@ -2513,7 +2708,22 @@ void VisualShaderEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da } else if (ClassDB::get_parent_class(type) == "Texture2D") { saved_node_pos = p_point + Vector2(0, j * 210 * EDSCALE); saved_node_pos_dirty = true; - _add_texture_node(arr[i]); + _add_texture2d_node(arr[i]); + j++; + } else if (type == "Texture2DArray") { + saved_node_pos = p_point + Vector2(0, j * 210 * EDSCALE); + saved_node_pos_dirty = true; + _add_texture2d_array_node(arr[i]); + j++; + } else if (ClassDB::get_parent_class(type) == "Texture3D") { + saved_node_pos = p_point + Vector2(0, j * 210 * EDSCALE); + saved_node_pos_dirty = true; + _add_texture3d_node(arr[i]); + j++; + } else if (type == "Cubemap") { + saved_node_pos = p_point + Vector2(0, j * 210 * EDSCALE); + saved_node_pos_dirty = true; + _add_cubemap_node(arr[i]); j++; } } @@ -2569,7 +2779,6 @@ void VisualShaderEditor::_update_preview() { } void VisualShaderEditor::_bind_methods() { - ClassDB::bind_method("_rebuild", &VisualShaderEditor::_rebuild); ClassDB::bind_method("_update_graph", &VisualShaderEditor::_update_graph); ClassDB::bind_method("_update_options_menu", &VisualShaderEditor::_update_options_menu); ClassDB::bind_method("_add_node", &VisualShaderEditor::_add_node); @@ -2580,6 +2789,8 @@ void VisualShaderEditor::_bind_methods() { ClassDB::bind_method("_clear_buffer", &VisualShaderEditor::_clear_buffer); ClassDB::bind_method("_update_uniforms", &VisualShaderEditor::_update_uniforms); ClassDB::bind_method("_set_mode", &VisualShaderEditor::_set_mode); + ClassDB::bind_method("_nodes_dragged", &VisualShaderEditor::_nodes_dragged); + ClassDB::bind_method("_float_constant_selected", &VisualShaderEditor::_float_constant_selected); ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &VisualShaderEditor::get_drag_data_fw); ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &VisualShaderEditor::can_drop_data_fw); @@ -3048,15 +3259,9 @@ VisualShaderEditor::VisualShaderEditor() { //CONSTANTS - add_options.push_back(AddOption("E", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("E constant (2.718282). Represents the base of the natural logarithm."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_E)); - add_options.push_back(AddOption("Epsilon", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Epsilon constant (0.00001). Smallest possible scalar number."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, CMP_EPSILON)); - add_options.push_back(AddOption("Phi", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Phi constant (1.618034). Golden ratio."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, 1.618034f)); - add_options.push_back(AddOption("Pi/4", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Pi/4 constant (0.785398) or 45 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI / 4)); - add_options.push_back(AddOption("Pi/2", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Pi/2 constant (1.570796) or 90 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI / 2)); - add_options.push_back(AddOption("Pi", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Pi constant (3.141593) or 180 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI)); - add_options.push_back(AddOption("Tau", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Tau constant (6.283185) or 360 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_TAU)); - add_options.push_back(AddOption("Sqrt2", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Sqrt2 constant (1.414214). Square root of 2."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_SQRT2)); - + for (int i = 0; i < MAX_FLOAT_CONST_DEFS; i++) { + add_options.push_back(AddOption(float_constant_defs[i].name, "Scalar", "Constants", "VisualShaderNodeFloatConstant", float_constant_defs[i].desc, -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, float_constant_defs[i].value)); + } // FUNCTIONS add_options.push_back(AddOption("Abs", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the absolute value of the parameter."), VisualShaderNodeFloatFunc::FUNC_ABS, VisualShaderNode::PORT_TYPE_SCALAR)); @@ -3084,7 +3289,7 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("Max", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the greater of two values."), VisualShaderNodeFloatOp::OP_MAX, VisualShaderNode::PORT_TYPE_SCALAR)); add_options.push_back(AddOption("Min", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the lesser of two values."), VisualShaderNodeFloatOp::OP_MIN, VisualShaderNode::PORT_TYPE_SCALAR)); add_options.push_back(AddOption("Mix", "Scalar", "Functions", "VisualShaderNodeScalarInterp", TTR("Linear interpolation between two scalars."), -1, VisualShaderNode::PORT_TYPE_SCALAR)); - add_options.push_back(AddOption("MultiplyAdd", "Scalar", "Functions", "VisualShaderNodeMultiplyAdd", TTR("Performs a fused multiply-add operation (a * b + c) on scalars."), VisualShaderNodeMultiplyAdd::TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR)); + add_options.push_back(AddOption("MultiplyAdd", "Scalar", "Functions", "VisualShaderNodeMultiplyAdd", TTR("Performs a fused multiply-add operation (a * b + c) on scalars."), VisualShaderNodeMultiplyAdd::OP_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR)); add_options.push_back(AddOption("Negate", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeFloatFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_SCALAR)); add_options.push_back(AddOption("Negate", "Scalar", "Functions", "VisualShaderNodeIntFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeIntFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_SCALAR_INT)); add_options.push_back(AddOption("OneMinus", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("1.0 - scalar"), VisualShaderNodeFloatFunc::FUNC_ONEMINUS, VisualShaderNode::PORT_TYPE_SCALAR)); @@ -3122,11 +3327,13 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("IntUniform", "Scalar", "Variables", "VisualShaderNodeIntUniform", TTR("Scalar integer uniform."), -1, VisualShaderNode::PORT_TYPE_SCALAR_INT)); // TEXTURES - + cubemap_node_option_idx = add_options.size(); add_options.push_back(AddOption("CubeMap", "Textures", "Functions", "VisualShaderNodeCubemap", TTR("Perform the cubic texture lookup."), -1, -1)); - texture_node_option_idx = add_options.size(); + texture2d_node_option_idx = add_options.size(); add_options.push_back(AddOption("Texture2D", "Textures", "Functions", "VisualShaderNodeTexture", TTR("Perform the 2D texture lookup."), -1, -1)); + texture2d_array_node_option_idx = add_options.size(); add_options.push_back(AddOption("Texture2DArray", "Textures", "Functions", "VisualShaderNodeTexture2DArray", TTR("Perform the 2D-array texture lookup."), -1, -1, -1, -1, -1)); + texture3d_node_option_idx = add_options.size(); add_options.push_back(AddOption("Texture3D", "Textures", "Functions", "VisualShaderNodeTexture3D", TTR("Perform the 3D texture lookup."), -1, -1)); add_options.push_back(AddOption("CubeMapUniform", "Textures", "Variables", "VisualShaderNodeCubemapUniform", TTR("Cubic texture uniform lookup."), -1, -1)); @@ -3190,7 +3397,7 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("Min", "Vector", "Functions", "VisualShaderNodeVectorOp", TTR("Returns the lesser of two values."), VisualShaderNodeVectorOp::OP_MIN, VisualShaderNode::PORT_TYPE_VECTOR)); add_options.push_back(AddOption("Mix", "Vector", "Functions", "VisualShaderNodeVectorInterp", TTR("Linear interpolation between two vectors."), -1, VisualShaderNode::PORT_TYPE_VECTOR)); add_options.push_back(AddOption("MixS", "Vector", "Functions", "VisualShaderNodeVectorScalarMix", TTR("Linear interpolation between two vectors using scalar."), -1, VisualShaderNode::PORT_TYPE_VECTOR)); - add_options.push_back(AddOption("MultiplyAdd", "Vector", "Functions", "VisualShaderNodeMultiplyAdd", TTR("Performs a fused multiply-add operation (a * b + c) on vectors."), VisualShaderNodeMultiplyAdd::TYPE_VECTOR, VisualShaderNode::PORT_TYPE_VECTOR)); + add_options.push_back(AddOption("MultiplyAdd", "Vector", "Functions", "VisualShaderNodeMultiplyAdd", TTR("Performs a fused multiply-add operation (a * b + c) on vectors."), VisualShaderNodeMultiplyAdd::OP_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_VECTOR)); add_options.push_back(AddOption("Negate", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeVectorFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_VECTOR)); add_options.push_back(AddOption("Normalize", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("Calculates the normalize product of vector."), VisualShaderNodeVectorFunc::FUNC_NORMALIZE, VisualShaderNode::PORT_TYPE_VECTOR)); add_options.push_back(AddOption("OneMinus", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("1.0 - vector"), VisualShaderNodeVectorFunc::FUNC_ONEMINUS, VisualShaderNode::PORT_TYPE_VECTOR)); @@ -3434,8 +3641,11 @@ public: } } if (p_property != "constant") { - undo_redo->add_do_method(VisualShaderEditor::get_singleton()->get_graph_plugin(), "update_property_editor_deferred", shader_type, node_id); - undo_redo->add_undo_method(VisualShaderEditor::get_singleton()->get_graph_plugin(), "update_property_editor_deferred", shader_type, node_id); + undo_redo->add_do_method(VisualShaderEditor::get_singleton()->get_graph_plugin(), "update_node_deferred", shader_type, node_id); + undo_redo->add_undo_method(VisualShaderEditor::get_singleton()->get_graph_plugin(), "update_node_deferred", shader_type, node_id); + } else { + undo_redo->add_do_method(VisualShaderEditor::get_singleton()->get_graph_plugin(), "update_constant", shader_type, node_id); + undo_redo->add_undo_method(VisualShaderEditor::get_singleton()->get_graph_plugin(), "update_constant", shader_type, node_id); } undo_redo->commit_action(); diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h index 056d4c6a11..d43af82238 100644 --- a/editor/plugins/visual_shader_editor_plugin.h +++ b/editor/plugins/visual_shader_editor_plugin.h @@ -71,6 +71,8 @@ private: Map<int, InputPort> input_ports; Map<int, Port> output_ports; VBoxContainer *preview_box; + LineEdit *uniform_name; + OptionButton *const_op; }; Ref<VisualShader> visual_shader; @@ -86,11 +88,16 @@ public: void set_connections(List<VisualShader::Connection> &p_connections); void register_link(VisualShader::Type p_type, int p_id, VisualShaderNode *p_visual_node, GraphNode *p_graph_node); void register_output_port(int p_id, int p_port, TextureButton *p_button); + void register_uniform_name(int p_id, LineEdit *p_uniform_name); + void register_default_input_button(int p_node_id, int p_port_id, Button *p_button); + void register_constant_option_btn(int p_node_id, OptionButton *p_button); void clear_links(); void set_shader_type(VisualShader::Type p_type); bool is_preview_visible(int p_id) const; bool is_dirty() const; void make_dirty(bool p_enabled); + void update_node(VisualShader::Type p_type, int p_id); + void update_node_deferred(VisualShader::Type p_type, int p_node_id); void add_node(VisualShader::Type p_type, int p_id); void remove_node(VisualShader::Type p_type, int p_id); void connect_nodes(VisualShader::Type p_type, int p_from_node, int p_from_port, int p_to_node, int p_to_port); @@ -99,10 +106,12 @@ public: void set_node_position(VisualShader::Type p_type, int p_id, const Vector2 &p_position); void set_node_size(VisualShader::Type p_type, int p_id, const Vector2 &p_size); void refresh_node_ports(VisualShader::Type p_type, int p_node); - void update_property_editor(VisualShader::Type p_type, int p_node_id); - void update_property_editor_deferred(VisualShader::Type p_type, int p_node_id); void set_input_port_default_value(VisualShader::Type p_type, int p_node_id, int p_port_id, Variant p_value); - void register_default_input_button(int p_node_id, int p_port_id, Button *p_button); + void update_uniform_refs(); + void set_uniform_name(VisualShader::Type p_type, int p_node_id, const String &p_name); + void update_constant(VisualShader::Type p_type, int p_node_id); + int get_constant_index(float p_constant) const; + void update_node_size(int p_node_id); VisualShader::Type get_shader_type() const; VisualShaderGraphPlugin(); @@ -237,14 +246,22 @@ class VisualShaderEditor : public VBoxContainer { }; Vector<AddOption> add_options; - int texture_node_option_idx; + int cubemap_node_option_idx; + int texture2d_node_option_idx; + int texture2d_array_node_option_idx; + int texture3d_node_option_idx; int custom_node_option_idx; List<String> keyword_list; + List<VisualShaderNodeUniformRef> uniform_refs; + void _draw_color_over_button(Object *obj, Color p_color); void _add_custom_node(const String &p_path); - void _add_texture_node(const String &p_path); + void _add_cubemap_node(const String &p_path); + void _add_texture2d_node(const String &p_path); + void _add_texture2d_array_node(const String &p_path); + void _add_texture3d_node(const String &p_path); VisualShaderNode *_add_node(int p_idx, int p_op_idx = -1); void _update_options_menu(); void _set_mode(int p_which); @@ -255,7 +272,16 @@ class VisualShaderEditor : public VBoxContainer { static VisualShaderEditor *singleton; + struct DragOp { + VisualShader::Type type; + int node; + Vector2 from; + Vector2 to; + }; + List<DragOp> drag_buffer; + bool drag_dirty = false; void _node_dragged(const Vector2 &p_from, const Vector2 &p_to, int p_node); + void _nodes_dragged(); bool updating; void _connection_request(const String &p_from, int p_from_index, const String &p_to, int p_to_index); @@ -282,8 +308,8 @@ class VisualShaderEditor : public VBoxContainer { void _connection_to_empty(const String &p_from, int p_from_slot, const Vector2 &p_release_position); void _connection_from_empty(const String &p_to, int p_to_slot, const Vector2 &p_release_position); - void _line_edit_changed(const String &p_text, Object *line_edit, int p_node_id); - void _line_edit_focus_out(Object *line_edit, int p_node_id); + void _uniform_line_edit_changed(const String &p_text, int p_node_id); + void _uniform_line_edit_focus_out(Object *line_edit, int p_node_id); void _port_name_focus_out(Object *line_edit, int p_node_id, int p_port_id, bool p_output); @@ -306,11 +332,12 @@ class VisualShaderEditor : public VBoxContainer { Ref<VisualShaderGraphPlugin> graph_plugin; void _mode_selected(int p_id); - void _rebuild(); void _input_select_item(Ref<VisualShaderNodeInput> input, String name); void _uniform_select_item(Ref<VisualShaderNodeUniformRef> p_uniform, String p_name); + void _float_constant_selected(int p_index, int p_node); + VisualShader::Type get_current_shader_type() const; void _add_input_port(int p_node, int p_port, int p_port_type, const String &p_name); @@ -347,7 +374,8 @@ class VisualShaderEditor : public VBoxContainer { bool _is_available(int p_mode); void _update_created_node(GraphNode *node); - void _update_uniforms(); + void _update_uniforms(bool p_update_refs); + void _update_uniform_refs(Set<String> &p_names); protected: void _notification(int p_what); diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 1fb889d793..6393aa30ed 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -2093,7 +2093,8 @@ void ProjectManager::_run_project_confirm() { const String &selected = selected_list[i].project_key; String path = EditorSettings::get_singleton()->get("projects/" + selected); - if (!DirAccess::exists(path + "/.import")) { + // `.right(6)` on `IMPORTED_FILES_PATH` strips away the leading "res://". + if (!DirAccess::exists(path.plus_file(ProjectSettings::IMPORTED_FILES_PATH.right(6)))) { run_error_diag->set_text(TTR("Can't run project: Assets need to be imported.\nPlease edit the project to trigger the initial import.")); run_error_diag->popup_centered(); return; diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index ce869feddd..75dc840738 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -1115,7 +1115,7 @@ void SceneTreeDock::_notification(int p_what) { beginner_node_shortcuts->set_name("BeginnerNodeShortcuts"); node_shortcuts->add_child(beginner_node_shortcuts); - Button *button_2d = memnew(Button); + button_2d = memnew(Button); beginner_node_shortcuts->add_child(button_2d); button_2d->set_text(TTR("2D Scene")); button_2d->set_icon(get_theme_icon("Node2D", "EditorIcons")); @@ -1127,7 +1127,7 @@ void SceneTreeDock::_notification(int p_what) { button_3d->set_icon(get_theme_icon("Node3D", "EditorIcons")); button_3d->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_CREATE_3D_SCENE, false)); - Button *button_ui = memnew(Button); + button_ui = memnew(Button); beginner_node_shortcuts->add_child(button_ui); button_ui->set_text(TTR("User Interface")); button_ui->set_icon(get_theme_icon("Control", "EditorIcons")); @@ -1137,7 +1137,7 @@ void SceneTreeDock::_notification(int p_what) { favorite_node_shortcuts->set_name("FavoriteNodeShortcuts"); node_shortcuts->add_child(favorite_node_shortcuts); - Button *button_custom = memnew(Button); + button_custom = memnew(Button); node_shortcuts->add_child(button_custom); button_custom->set_text(TTR("Other Node")); button_custom->set_icon(get_theme_icon("Add", "EditorIcons")); @@ -1160,6 +1160,10 @@ void SceneTreeDock::_notification(int p_what) { button_instance->set_icon(get_theme_icon("Instance", "EditorIcons")); button_create_script->set_icon(get_theme_icon("ScriptCreate", "EditorIcons")); button_detach_script->set_icon(get_theme_icon("ScriptRemove", "EditorIcons")); + button_2d->set_icon(get_theme_icon("Node2D", "EditorIcons")); + button_3d->set_icon(get_theme_icon("Node3D", "EditorIcons")); + button_ui->set_icon(get_theme_icon("Control", "EditorIcons")); + button_custom->set_icon(get_theme_icon("Add", "EditorIcons")); filter->set_right_icon(get_theme_icon("Search", "EditorIcons")); filter->set_clear_button_enabled(true); @@ -1314,32 +1318,50 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP if (si) { List<PropertyInfo> properties; si->get_property_list(&properties); + NodePath root_path = p_base->get_path(); for (List<PropertyInfo>::Element *E = properties.front(); E; E = E->next()) { String propertyname = E->get().name; Variant p = p_base->get(propertyname); if (p.get_type() == Variant::NODE_PATH) { - // Goes through all paths to check if its matching + NodePath root_path_new = root_path; for (List<Pair<NodePath, NodePath>>::Element *F = p_renames->front(); F; F = F->next()) { - NodePath root_path = p_base->get_path(); + if (root_path == F->get().first) { + root_path_new = F->get().second; + break; + } + } + // Goes through all paths to check if its matching + for (List<Pair<NodePath, NodePath>>::Element *F = p_renames->front(); F; F = F->next()) { NodePath rel_path_old = root_path.rel_path_to(F->get().first); - NodePath rel_path_new = F->get().second; - - // if not empty, get new relative path - if (F->get().second != NodePath()) { - rel_path_new = root_path.rel_path_to(F->get().second); - } - // if old path detected, then it needs to be replaced with the new one if (p == rel_path_old) { + NodePath rel_path_new = F->get().second; + + // if not empty, get new relative path + if (!rel_path_new.is_empty()) { + rel_path_new = root_path_new.rel_path_to(F->get().second); + } + editor_data->get_undo_redo().add_do_property(p_base, propertyname, rel_path_new); editor_data->get_undo_redo().add_undo_property(p_base, propertyname, rel_path_old); p_base->set(propertyname, rel_path_new); break; } + + // update if the node itself moved up/down the tree hirarchy + if (root_path == F->get().first) { + NodePath abs_path = NodePath(String(root_path).plus_file(p)).simplified(); + NodePath rel_path_new = F->get().second.rel_path_to(abs_path); + + editor_data->get_undo_redo().add_do_property(p_base, propertyname, rel_path_new); + editor_data->get_undo_redo().add_undo_property(p_base, propertyname, p); + + p_base->set(propertyname, rel_path_new); + } } } } diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h index 150c1976ef..c2c877bf68 100644 --- a/editor/scene_tree_dock.h +++ b/editor/scene_tree_dock.h @@ -110,7 +110,10 @@ class SceneTreeDock : public VBoxContainer { Button *button_create_script; Button *button_detach_script; + Button *button_2d; Button *button_3d; + Button *button_ui; + Button *button_custom; HBoxContainer *button_hb; Button *edit_local, *edit_remote; diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index a62448169d..3dee4a229f 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -251,7 +251,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) { if (can_rename) { //should be can edit.. String warning = p_node->get_configuration_warning(); - if (warning != String()) { + if (!warning.empty()) { item->add_button(0, get_theme_icon("NodeWarning", "EditorIcons"), BUTTON_WARNING, false, TTR("Node configuration warning:") + "\n" + p_node->get_configuration_warning()); } @@ -777,6 +777,9 @@ void SceneTreeEditor::_renamed() { return; } + // Trim leading/trailing whitespace to prevent node names from containing accidental whitespace, which would make it more difficult to get the node via `get_node()`. + new_name = new_name.strip_edges(); + if (!undo_redo) { n->set_name(new_name); which->set_metadata(0, n->get_path()); diff --git a/editor/translations/af.po b/editor/translations/af.po index c439941fb8..19a9e724ba 100644 --- a/editor/translations/af.po +++ b/editor/translations/af.po @@ -545,6 +545,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -732,7 +733,7 @@ msgstr "Pas Letterkas" msgid "Whole Words" msgstr "Hele Woorde" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Vervang" @@ -936,6 +937,11 @@ msgid "Signals" msgstr "Seine" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Eienskappe" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -977,7 +983,7 @@ msgid "Recent:" msgstr "Onlangse:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Soek:" @@ -1687,16 +1693,17 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "" - -#: editor/editor_feature_profile.cpp #, fuzzy msgid "Node Dock" msgstr "Nodus Naam:" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Deursoek Klasse" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1982,7 +1989,7 @@ msgstr "Gidse & Lêers:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Voorskou:" @@ -2842,22 +2849,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2866,8 +2877,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2876,32 +2887,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2963,7 +2974,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Soek" @@ -3368,7 +3379,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -5187,7 +5199,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7863,7 +7875,7 @@ msgid "New Animation" msgstr "Optimaliseer Animasie" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10354,11 +10366,16 @@ msgid "Batch Rename" msgstr "Pas Letterkas" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Vervang" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10406,7 +10423,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10466,7 +10483,7 @@ msgid "Reset" msgstr "Herset Zoem" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -12465,6 +12482,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/ar.po b/editor/translations/ar.po index fecec9b136..6335b82b15 100644 --- a/editor/translations/ar.po +++ b/editor/translations/ar.po @@ -44,12 +44,13 @@ # Ø£Øمد مصطÙÙ‰ الطبراني <eltabaraniahmed@gmail.com>, 2020. # ChemicalInk <aladdinalkhafaji@gmail.com>, 2020. # Musab Alasaifer <mousablasefer@gmail.com>, 2020. +# Yassine Oudjana <y.oudjana@protonmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-08-20 15:20+0000\n" -"Last-Translator: Ø£Øمد مصطÙÙ‰ الطبراني <eltabaraniahmed@gmail.com>\n" +"PO-Revision-Date: 2020-09-12 00:46+0000\n" +"Last-Translator: Yassine Oudjana <y.oudjana@protonmail.com>\n" "Language-Team: Arabic <https://hosted.weblate.org/projects/godot-engine/" "godot/ar/>\n" "Language: ar\n" @@ -58,7 +59,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " "&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n" -"X-Generator: Weblate 4.2.1-dev\n" +"X-Generator: Weblate 4.3-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -562,6 +563,7 @@ msgid "Seconds" msgstr "ثواني" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "إطار خلال ثانية" @@ -740,7 +742,7 @@ msgstr "قضية تشابه" msgid "Whole Words" msgstr "كل الكلمات" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "إستبدال" @@ -931,6 +933,11 @@ msgid "Signals" msgstr "الإشارات" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "تنقية البلاطات" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "هل أنت متأكد أنك تود إزالة كل الإتصالات من هذه الإشارة؟" @@ -968,7 +975,7 @@ msgid "Recent:" msgstr "الØالي:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "بØØ«:" @@ -1172,12 +1179,10 @@ msgid "Gold Sponsors" msgstr "الرعاة الذهبيين" #: editor/editor_about.cpp -#, fuzzy msgid "Silver Sponsors" msgstr "المانØين الÙضيين" #: editor/editor_about.cpp -#, fuzzy msgid "Bronze Sponsors" msgstr "المانØين البرنزيين" @@ -1657,16 +1662,17 @@ msgid "Scene Tree Editing" msgstr "تعديل شجرة المشهد" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "رصي٠الاستيراد" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "رصي٠العÙقد" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "رصي٠نظام الملÙات Ùˆ الاستيراد" +#, fuzzy +msgid "FileSystem Dock" +msgstr "نظام الملÙات" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "رصي٠الاستيراد" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1928,7 +1934,7 @@ msgstr "الوجهات والملÙات:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "إستعراض:" @@ -2719,15 +2725,15 @@ msgstr "ØÙظ جميع المشاهد" #: editor/editor_node.cpp msgid "Convert To..." -msgstr "تØويل الي..." +msgstr "تØويل إلى..." #: editor/editor_node.cpp msgid "MeshLibrary..." -msgstr "مكتبة المجسم..." +msgstr "مكتبة مجسّمات..." #: editor/editor_node.cpp msgid "TileSet..." -msgstr "مجموعة البلاط..." +msgstr "مجموعة بلاط..." #: editor/editor_node.cpp editor/plugins/script_text_editor.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp @@ -2741,7 +2747,7 @@ msgstr "إعادة تراجع" #: editor/editor_node.cpp msgid "Miscellaneous project or scene-wide tools." -msgstr "ادوات لكل-المشهد او لمشاريع متنوعه." +msgstr "أدوات مشروع أو مشهد متنوعة." #: editor/editor_node.cpp editor/project_manager.cpp #: editor/script_create_dialog.cpp @@ -2799,24 +2805,28 @@ msgstr "نشر مع تصØÙŠØ Ø§Ù„Ø£Ø®Ø·Ø§Ø¡ عن بعد" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Øينما يتم التصدير أو النشر، مل٠التشغيل الناتج سو٠يØاول الإتصال إلي عنوان " -"الأي بي الخاص بهذا الكمبيوتر من أجل تصØÙŠØ Ø§Ù„Ø£Ø®Ø·Ø§Ø¡." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "نشر مصغر مع نظام شبكات الملÙات" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Øينما يتم تÙعيل هذا الإعداد، التصدير أو النشر سو٠ينتج مل٠تشغيل بالØد " "الأدنى (مبسط).\n" @@ -2829,9 +2839,10 @@ msgid "Visible Collision Shapes" msgstr "أشكال إصطدام ظاهرة" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "أشكال الإصطدام Ùˆ عÙقد الراي كاست (من أجل 2D Ùˆ 3D) سو٠تكون ظاهرة ÙÙŠ اللعبة " "العاملة إذا كان هذا الإعداد Ù…ÙÙعّل." @@ -2841,22 +2852,25 @@ msgid "Visible Navigation" msgstr "الإنتقال المرئي" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "مجسمات التنقل والأشكال المضلعة سو٠تكون ظاهرة Øينما يتم تÙعيل هذا الإعداد." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "مزامنة تغييرات المشهد" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Øينما يكون هذا الإعداد Ù…ÙÙعل، أي تغيير ÙŠØدث ÙÙŠ المشهد من خلال المÙعدل سو٠يتم " "تطبيقة ÙÙŠ اللعبة العاملة.\n" @@ -2864,15 +2878,17 @@ msgstr "" "الملÙات." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "مزامنة تغييرات الكود" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Øينما يكون هذا الإعداد Ù…ÙÙعل، أي نص برمجي يتم ØÙظه سيتم إعادة تØميله ÙÙŠ " "اللعبة العاملة.\n" @@ -2936,7 +2952,7 @@ msgstr "مساعدة" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "بØØ«" @@ -3351,9 +3367,11 @@ msgid "Add Key/Value Pair" msgstr "إضاÙØ© زوج Ù…ÙتاØ/قيمة" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "لا يوجد إعداد تصدير مسبق عامل لهذه المنصة.\n" "من Ùضلك أض٠إعداد تصدير عامل ÙÙŠ قائمة التصدير." @@ -5114,7 +5132,7 @@ msgid "Bake Lightmaps" msgstr "إعداد خرائط الضوء" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "استعراض" @@ -7751,7 +7769,8 @@ msgid "New Animation" msgstr "رسومية متØركة جديدة" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "السرعة (إطار Ù. Ø«. FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10313,11 +10332,18 @@ msgid "Batch Rename" msgstr "إعادة تسمية الدÙعة" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "إستبدال: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "بادئة" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "لاØقة" #: editor/rename_dialog.cpp @@ -10365,7 +10391,8 @@ msgid "Per-level Counter" msgstr "العداد ÙˆÙÙ‚-المستوى" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "إذا تم تØديده Ùإن العداد سيعيد البدء لكل مجموعة من العÙقد الأبناء" #: editor/rename_dialog.cpp @@ -10425,7 +10452,8 @@ msgid "Reset" msgstr "إعادة تعيين" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "خطأ ذو علاقة بالتعبير الاعتيادي Regular Expression" #: editor/rename_dialog.cpp @@ -12513,6 +12541,11 @@ msgstr "" "GIProbes لا يدعم برنامج تشغيل الÙيديو GLES2.\n" "استخدم BakedLightmap بدلاً من ذلك." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "بقعة الضوء بزاوية أكبر من 90 درجة لا يمكنها إلقاء الظلال." @@ -12816,6 +12849,16 @@ msgstr "يمكن تعيين المتغيرات Ùقط ÙÙŠ الذروة ." msgid "Constants cannot be modified." msgstr "لا يمكن تعديل الثوابت." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "رصي٠نظام الملÙات Ùˆ الاستيراد" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Øينما يتم التصدير أو النشر، مل٠التشغيل الناتج سو٠يØاول الإتصال إلي " +#~ "عنوان الأي بي الخاص بهذا الكمبيوتر من أجل تصØÙŠØ Ø§Ù„Ø£Ø®Ø·Ø§Ø¡." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "المشهد الØالي لم يتم ØÙظه. الرجاء ØÙظ المشهد قبل تشغيله Ùˆ اختباره." diff --git a/editor/translations/bg.po b/editor/translations/bg.po index c327d96e57..3bb60a79e0 100644 --- a/editor/translations/bg.po +++ b/editor/translations/bg.po @@ -8,12 +8,14 @@ # MaresPW <marespw206@gmail.com>, 2018. # PakoSt <kokotekilata@gmail.com>, 2018, 2020. # Damyan Dichev <mwshock2@gmail.com>, 2019. +# Whod <whodizhod@gmail.com>, 2020. +# Stoyan <stoyan.stoyanov99@protonmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-03-27 15:42+0000\n" -"Last-Translator: PakoSt <kokotekilata@gmail.com>\n" +"PO-Revision-Date: 2020-09-15 07:17+0000\n" +"Last-Translator: Stoyan <stoyan.stoyanov99@protonmail.com>\n" "Language-Team: Bulgarian <https://hosted.weblate.org/projects/godot-engine/" "godot/bg/>\n" "Language: bg\n" @@ -21,7 +23,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.0-dev\n" +"X-Generator: Weblate 4.3-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -103,7 +105,7 @@ msgstr "Свободно" #: editor/animation_bezier_editor.cpp msgid "Balanced" -msgstr "" +msgstr "БаланÑиран" #: editor/animation_bezier_editor.cpp msgid "Mirror" @@ -192,11 +194,11 @@ msgstr "ПромÑна на продължителноÑтта на анимац #: editor/animation_track_editor.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Change Animation Loop" -msgstr "" +msgstr "Промени Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ð¾Ð½Ð½Ð¸Ñ Ñ†Ð¸ÐºÑŠÐ»" #: editor/animation_track_editor.cpp msgid "Property Track" -msgstr "" +msgstr "Път за промÑна на ÑвойÑтвото" #: editor/animation_track_editor.cpp msgid "3D Transform Track" @@ -516,6 +518,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -643,9 +646,8 @@ msgid "Select All/None" msgstr "Избиране на вÑичко/нищо" #: editor/animation_track_editor_plugins.cpp -#, fuzzy msgid "Add Audio Track Clip" -msgstr "ДобавÑне на нови пътечки." +msgstr "ДобавÑне на аудио клип" #: editor/animation_track_editor_plugins.cpp msgid "Change Audio Track Clip Start Offset" @@ -696,7 +698,7 @@ msgstr "" msgid "Whole Words" msgstr "Цели думи" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "ЗамÑна" @@ -885,6 +887,11 @@ msgid "Signals" msgstr "" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "ПоÑтавÑне на възелите" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -922,7 +929,7 @@ msgid "Recent:" msgstr "ПоÑледни:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "ТърÑене:" @@ -1592,16 +1599,17 @@ msgid "Scene Tree Editing" msgstr "Редактиране на дървото на Ñцената" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Панел за внаÑÑне" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Панел за възлите" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Показване във файловата ÑиÑтема" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Панел за внаÑÑне" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1863,7 +1871,7 @@ msgstr "Папки и файлове:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2689,22 +2697,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2713,8 +2725,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2723,32 +2735,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2808,7 +2820,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "ТърÑене" @@ -3210,7 +3222,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -4250,9 +4263,8 @@ msgid "Anim Clips" msgstr "" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Audio Clips" -msgstr "ДобавÑне на нови пътечки." +msgstr "Ðудио клипове" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Functions" @@ -4413,9 +4425,8 @@ msgid "Onion Skinning Options" msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "Directions" -msgstr "ОпиÑание:" +msgstr "УказаниÑ" #: editor/plugins/animation_player_editor_plugin.cpp #, fuzzy @@ -4772,9 +4783,8 @@ msgid "Redirect loop." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Request failed, timeout" -msgstr "ЗаÑвката Ñе провали, върнат код:" +msgstr "ЗаÑвката е неуÑпешна, изчакването е неуÑпешно" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Timeout." @@ -4821,9 +4831,8 @@ msgid "Idle" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Install..." -msgstr "ИнÑталиране" +msgstr "ИнÑталирате..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Retry" @@ -4893,9 +4902,8 @@ msgid "Import..." msgstr "Повторно внаÑÑне..." #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Plugins..." -msgstr "ПриÑтавки" +msgstr "ПриÑтавки ..." #: editor/plugins/asset_library_editor_plugin.cpp editor/project_manager.cpp msgid "Sort:" @@ -4911,9 +4919,8 @@ msgid "Site:" msgstr "Уеб Ñайт:" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Support" -msgstr "Поддръжка..." +msgstr "Поддръжка" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Official" @@ -4954,7 +4961,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Преглед" @@ -4979,9 +4986,8 @@ msgid "steps" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Rotation Offset:" -msgstr "ИзмеÑтване при Завъртане:" +msgstr "ИзмеÑтване на въртенето:" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Rotation Step:" @@ -7601,7 +7607,8 @@ msgid "New Animation" msgstr "Ðова анимациÑ" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "СкороÑÑ‚ (кадри в Ñекунда):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10085,11 +10092,16 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "ЗамÑна: " + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10135,7 +10147,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10193,8 +10205,9 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" -msgstr "" +#, fuzzy +msgid "Regular Expression Error:" +msgstr "Използване на регулÑрни изрази" #: editor/rename_dialog.cpp msgid "At character %s" @@ -11907,9 +11920,8 @@ msgid "Invalid package publisher display name." msgstr "невалидно име на Група." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid product GUID." -msgstr "Име:" +msgstr "Ðевалиден продуктов GUID." #: platform/uwp/export/export.cpp msgid "Invalid publisher GUID." @@ -12244,6 +12256,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12500,7 +12517,7 @@ msgstr "" #: servers/visual/shader_language.cpp msgid "Constants cannot be modified." -msgstr "" +msgstr "КонÑтантите не могат да бъдат променени." #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" diff --git a/editor/translations/bn.po b/editor/translations/bn.po index dd713b6b81..8415bb30bd 100644 --- a/editor/translations/bn.po +++ b/editor/translations/bn.po @@ -567,6 +567,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "à¦à¦« পি à¦à¦¸" @@ -755,7 +756,7 @@ msgstr "অকà§à¦·à¦°à§‡à¦° মাতà§à¦°à¦¾ (বড়/ছোট-হাতেà msgid "Whole Words" msgstr "সমà§à¦ªà§‚রà§à¦£ শবà§à¦¦" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "পà§à¦°à¦¤à¦¿à¦¸à§à¦¥à¦¾à¦ªà¦¨ করà§à¦¨" @@ -964,6 +965,11 @@ msgid "Signals" msgstr "সংকেতসমূহ" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "দà§à¦°à§à¦¤ ফাইলসমূহ ফিলà§à¦Ÿà¦¾à¦° করà§à¦¨..." + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -1006,7 +1012,7 @@ msgid "Recent:" msgstr "সামà§à¦ªà§à¦°à¦¤à¦¿à¦•:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ করà§à¦¨:" @@ -1728,21 +1734,21 @@ msgstr "দৃশà§à¦¯à§‡à¦° শাখা (নোডসমূহ):" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "Import Dock" -msgstr "ইমà§à¦ªà§‹à¦°à§à¦Ÿ" - -#: editor/editor_feature_profile.cpp -#, fuzzy msgid "Node Dock" msgstr "মোড (Mode) সরান" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "FileSystem and Import Docks" +msgid "FileSystem Dock" msgstr "ফাইলসিসà§à¦Ÿà§‡à¦®" #: editor/editor_feature_profile.cpp #, fuzzy +msgid "Import Dock" +msgstr "ইমà§à¦ªà§‹à¦°à§à¦Ÿ" + +#: editor/editor_feature_profile.cpp +#, fuzzy msgid "Erase profile '%s'? (no undo)" msgstr "সমসà§à¦¤à¦—à§à¦²à¦¿ পà§à¦°à¦¤à¦¿à¦¸à§à¦¥à¦¾à¦ªà¦¨ করà§à¦¨" @@ -2034,7 +2040,7 @@ msgstr "পথ à¦à¦¬à¦‚ ফাইল:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "পà§à¦°à¦¿à¦à¦¿à¦‰:" @@ -2970,24 +2976,28 @@ msgstr "দূরবরà§à¦¤à§€ ডিবাগের সহিত ডিপৠ#: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ (Export) বা ডিপà§à¦²à§Ÿ (Deploy)-à¦à¦° সময় পà§à¦°à¦¸à§à¦¤à§à¦¤à¦•à§ƒà¦¤ à¦à¦•à§à¦¸à¦¿à¦•à¦¿à¦‰à¦Ÿà§‡à¦¬à¦² (executable) " -"ডিবাগ (debug)-à¦à¦° উদà§à¦¦à§‡à¦¶à§à¦¯à§‡ à¦à¦‡ কমà§à¦ªà¦¿à¦‰à¦Ÿà¦¾à¦°à§‡à¦° আইপি (IP)-তে সংযোগ করার চেষà§à¦Ÿà¦¾ করবে।" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "নেটওয়ারà§à¦• ফাইল-সিসà§à¦Ÿà§‡à¦®à§‡à¦° সহিত কà§à¦·à§à¦¦à§à¦°-ডিপà§à¦²à§Ÿ করà§à¦¨" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "à¦à¦‡ সিদà§à¦§à¦¾à¦¨à§à¦¤à¦Ÿà¦¿ (অপশন) সকà§à¦°à¦¿à¦¯à¦¼ করলে, à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ (Export) বা ডিপà§à¦²à§Ÿ (Deploy)-ঠসà§à¦¬à¦²à§à¦ªà¦¤à¦® " "মানের à¦à¦•à§à¦¸à¦¿à¦•à¦¿à¦‰à¦Ÿà§‡à¦¬à¦² (executable) উৎপাদন হবে।\n" @@ -3001,9 +3011,10 @@ msgid "Visible Collision Shapes" msgstr "দৃশà§à¦¯à¦®à¦¾à¦¨ সাংঘরà§à¦·à¦¿à¦• আকারসমূহ (Collision Shapes)" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "à¦à¦‡ সিদà§à¦§à¦¾à¦¨à§à¦¤à¦Ÿà¦¿ (অপশন) সকà§à¦°à¦¿à¦¯à¦¼ করলে চলমান গেমে কলিশ়ন (Collision) আকৃতি à¦à¦¬à¦‚ রে-কাসà§à¦Ÿ " "(RayCast) নোড (2D à¦à¦¬à¦‚ 3D) দৃশà§à¦¯à¦®à¦¾à¦¨ হবে।" @@ -3013,23 +3024,26 @@ msgid "Visible Navigation" msgstr "দৃশà§à¦¯à¦®à¦¾à¦¨ নেà¦à¦¿à¦—েশন (Navigation)" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "à¦à¦‡ সিদà§à¦§à¦¾à¦¨à§à¦¤à¦Ÿà¦¿ (অপশন) সকà§à¦°à¦¿à¦¯à¦¼ করলে চলমান গেমে নà§à¦¯à¦¾à¦à¦¿à¦—েশন (Navigation) মেস à¦à¦¬à¦‚ " "পলিগন-সমূহ দৃশà§à¦¯à¦®à¦¾à¦¨ হবে।" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "দৃশà§à¦¯à§‡à¦° পরিবরà§à¦¤à¦¨à¦¸à¦®à§‚হ সà§à¦¸à¦‚গত/সমনà§à¦¬à§Ÿ করà§à¦¨" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "à¦à¦‡ সিদà§à¦§à¦¾à¦¨à§à¦¤à¦Ÿà¦¿ (অপশন) সকà§à¦°à¦¿à¦¯à¦¼ থাকলে, à¦à¦¡à¦¿à¦Ÿà¦°à§‡ কোনো দৃশà§à¦¯à§‡à¦° পরিবরà§à¦¤à¦¨ করলে তা চলমান " "গেমে পà§à¦°à¦¤à¦¿à¦«à¦²à¦¿à¦¤ হবে।\n" @@ -3037,15 +3051,17 @@ msgstr "" "কারà§à¦¯à¦•à¦° করবে।" #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿà§‡à¦° পরিবরà§à¦¤à¦¨à¦¸à¦®à§‚হ সà§à¦¸à¦‚গত/সমনà§à¦¬à§Ÿ করà§à¦¨" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "à¦à¦‡ সিদà§à¦§à¦¾à¦¨à§à¦¤à¦Ÿà¦¿ (অপশন) সকà§à¦°à¦¿à¦¯à¦¼ থাকলে, কোনো সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿà§‡à¦° পরিবরà§à¦¤à¦¨ সংরকà§à¦·à¦£à§‡ তা চলমান গেমে " "পà§à¦°à¦¤à¦¿à¦«à¦²à¦¿à¦¤ হবে।\n" @@ -3118,7 +3134,7 @@ msgstr "হেলà§à¦ª" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ করà§à¦¨" @@ -3555,9 +3571,11 @@ msgid "Add Key/Value Pair" msgstr "" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "কাংখিত পà§à¦²à§à¦¯à¦¾à¦Ÿà¦«à¦°à§à¦®à§‡à¦° জনà§à¦¯ গà§à¦°à¦¹à¦£à¦¯à§‹à¦—à§à¦¯ কোন à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ পà§à¦°à¦¿à¦¸à§‡à¦Ÿ খà§à¦à¦œà§‡ পাওয়া যায়নি।\n" "অনà§à¦—à§à¦°à¦¹ করে à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ মেনà§à¦¤à§‡ à¦à¦•à¦Ÿà¦¿ সঠিক পà§à¦°à¦¿à¦¸à§‡à¦Ÿ যোগ করà§à¦¨à¥¤" @@ -5495,7 +5513,7 @@ msgid "Bake Lightmaps" msgstr "লাইটà§à¦®à§à¦¯à¦¾à¦ªà§‡ হসà§à¦¤à¦¾à¦¨à§à¦¤à¦° করà§à¦¨:" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "পà§à¦°à¦¿à¦à¦¿à¦‰" @@ -8339,7 +8357,8 @@ msgid "New Animation" msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "গতি (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10993,11 +11012,16 @@ msgid "Batch Rename" msgstr "পà§à¦¨à¦ƒà¦¨à¦¾à¦®à¦•à¦°à¦£ করà§à¦¨" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "পà§à¦°à¦¤à¦¿à¦¸à§à¦¥à¦¾à¦ªà¦¨ করà§à¦¨" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -11049,7 +11073,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -11113,7 +11137,7 @@ msgstr "সমà§à¦ªà§à¦°à¦¸à¦¾à¦°à¦¨/সংকোচন অপসারণ ক #: editor/rename_dialog.cpp #, fuzzy -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "অà¦à¦¿à¦¬à§à¦¯à¦•à§à¦¤à¦¿ (Expression) পরিবরà§à¦¤à¦¨ করà§à¦¨" #: editor/rename_dialog.cpp @@ -13293,6 +13317,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -13572,6 +13601,18 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#, fuzzy +#~ msgid "FileSystem and Import Docks" +#~ msgstr "ফাইলসিসà§à¦Ÿà§‡à¦®" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ (Export) বা ডিপà§à¦²à§Ÿ (Deploy)-à¦à¦° সময় পà§à¦°à¦¸à§à¦¤à§à¦¤à¦•à§ƒà¦¤ à¦à¦•à§à¦¸à¦¿à¦•à¦¿à¦‰à¦Ÿà§‡à¦¬à¦² " +#~ "(executable) ডিবাগ (debug)-à¦à¦° উদà§à¦¦à§‡à¦¶à§à¦¯à§‡ à¦à¦‡ কমà§à¦ªà¦¿à¦‰à¦Ÿà¦¾à¦°à§‡à¦° আইপি (IP)-তে সংযোগ " +#~ "করার চেষà§à¦Ÿà¦¾ করবে।" + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "বরà§à¦¤à¦®à¦¾à¦¨ দৃশà§à¦¯à¦Ÿà¦¿ কখনোই সংরকà§à¦·à¦£ করা হয় নি, অনà§à¦—à§à¦°à¦¹ করে চালানোর পূরà§à¦¬à§‡ à¦à¦Ÿà¦¿ সংরকà§à¦·à¦£ " diff --git a/editor/translations/ca.po b/editor/translations/ca.po index feb0f8fea4..629583d816 100644 --- a/editor/translations/ca.po +++ b/editor/translations/ca.po @@ -536,6 +536,7 @@ msgid "Seconds" msgstr "Segons" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -714,7 +715,7 @@ msgstr "Distingeix entre majúscules i minúscules" msgid "Whole Words" msgstr "Paraules senceres" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp #, fuzzy msgid "Replace" msgstr "Reemplaçar" @@ -910,6 +911,11 @@ msgid "Signals" msgstr "Senyals" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtrat de Fitxers" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Esteu segur que voleu eliminar totes les connexions d'aquest senyal?" @@ -947,7 +953,7 @@ msgid "Recent:" msgstr "Recents:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Cerca:" @@ -1639,16 +1645,17 @@ msgid "Scene Tree Editing" msgstr "Edició de l'arbre d'escenes" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Importació" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Nodes" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Importació i sistema de fitxers" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Sistema de Fitxers" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Importació" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1912,7 +1919,7 @@ msgstr "Directoris i Fitxers:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Vista prèvia:" @@ -2800,24 +2807,28 @@ msgstr "Desplegar amb Depuració Remota" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"En ser exportat o desplegat, l'executable resultant intenta connectar-se a " -"l'IP d'aquest equip per iniciar-ne la depuració." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Desplegament Reduït amb Sistema de Fitxers en Xarxa" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Amb aquesta opció activada, 'Exportar' o 'Desplegar' generen un executable " "reduït.\n" @@ -2831,9 +2842,10 @@ msgid "Visible Collision Shapes" msgstr "Formes de Col·lisió Visibles" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Les formes de col·lisió i nodes de difusió de raigs (raycast) (per a 2D i " "3D), son visibles durant l'execució del joc quan s'activa aquesta opció." @@ -2843,23 +2855,26 @@ msgid "Visible Navigation" msgstr "Navegació Visible" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Aquesta opció fa visibles les malles i polÃgons de Navegació durant " "l'execució del joc." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Sincronitzar Canvis en Escena" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "En activar aquesta opció, els canvis fets en l'Editor es repliquen en el joc " "en execució.\n" @@ -2867,15 +2882,17 @@ msgstr "" "millora el rendiment." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Sincronitzar Canvis en Scripts" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "En activar aquesta opció, els Scripts, en ser desats, es recarreguen en el " "joc en execució.\n" @@ -2941,7 +2958,7 @@ msgstr "Ajuda" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Cerca" @@ -3368,9 +3385,11 @@ msgid "Add Key/Value Pair" msgstr "Afegeix una Parella de Clau/Valor" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "No s'ha trobat cap patró d'exportació executable per aquesta plataforma. \n" "Afegiu un patró predeterminat en el menú d'exportació." @@ -5170,7 +5189,7 @@ msgid "Bake Lightmaps" msgstr "Precalcular Lightmaps" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Previsualització" @@ -7906,7 +7925,8 @@ msgid "New Animation" msgstr "Nova Animació" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "Velocitat (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10595,11 +10615,18 @@ msgid "Batch Rename" msgstr "Reanomena" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Reemplaça: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "Prefix" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "Sufix" #: editor/rename_dialog.cpp @@ -10649,7 +10676,8 @@ msgid "Per-level Counter" msgstr "Comptador per nivell" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "Si s'estableix el comptador es reinicia per a cada grup de nodes fills" #: editor/rename_dialog.cpp @@ -10711,7 +10739,7 @@ msgstr "Resetejar" #: editor/rename_dialog.cpp #, fuzzy -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "Expressions Regulars" #: editor/rename_dialog.cpp @@ -12874,6 +12902,11 @@ msgstr "" "Les GIProbes no estan suportades pel controlador de vÃdeo GLES2.\n" "Utilitzeu un BakedLightmap en el seu lloc." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp #, fuzzy msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." @@ -13181,6 +13214,16 @@ msgstr "" msgid "Constants cannot be modified." msgstr "Les constants no es poden modificar." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Importació i sistema de fitxers" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "En ser exportat o desplegat, l'executable resultant intenta connectar-se " +#~ "a l'IP d'aquest equip per iniciar-ne la depuració." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "L'escena actual no s'ha desat encara. Desa l'escena abans d'executar-la." diff --git a/editor/translations/cs.po b/editor/translations/cs.po index f6bb57006a..2839053135 100644 --- a/editor/translations/cs.po +++ b/editor/translations/cs.po @@ -21,12 +21,13 @@ # Ondrej Pavelka <ondrej.pavelka@outlook.com>, 2020. # ZbynÄ›k <zbynek.fiala@gmail.com>, 2020. # Daniel KřÞ <Daniel.kriz@protonmail.com>, 2020. +# VladimirBlazek <vblazek042@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-08-16 03:50+0000\n" -"Last-Translator: ZbynÄ›k <zbynek.fiala@gmail.com>\n" +"PO-Revision-Date: 2020-09-12 00:46+0000\n" +"Last-Translator: VladimirBlazek <vblazek042@gmail.com>\n" "Language-Team: Czech <https://hosted.weblate.org/projects/godot-engine/godot/" "cs/>\n" "Language: cs\n" @@ -34,7 +35,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -"X-Generator: Weblate 4.2-dev\n" +"X-Generator: Weblate 4.3-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -546,6 +547,7 @@ msgid "Seconds" msgstr "Sekundy" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -724,7 +726,7 @@ msgstr "RozliÅ¡ovat malá/velká" msgid "Whole Words" msgstr "Celá slova" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Nahradit" @@ -916,6 +918,11 @@ msgid "Signals" msgstr "Signály" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtrovat soubory..." + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Jste si jistÃ, že chcete odstranit vÅ¡echna pÅ™ipojenà z tohoto signálu?" @@ -953,7 +960,7 @@ msgid "Recent:" msgstr "Nedávné:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Hledat:" @@ -1642,20 +1649,20 @@ msgid "Scene Tree Editing" msgstr "Úpravy stromu scény" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Importovat dok" - -#: editor/editor_feature_profile.cpp #, fuzzy msgid "Node Dock" msgstr "Uzel pÅ™esunut" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "FileSystem and Import Docks" +msgid "FileSystem Dock" msgstr "Souborový systém" #: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Importovat dok" + +#: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" msgstr "Smazat profil '%s'? (bez možnosti vrácenÃ)" @@ -1916,7 +1923,7 @@ msgstr "Složky a soubory:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Náhled:" @@ -2566,6 +2573,8 @@ msgid "" "You can change it later in \"Project Settings\" under the 'application' " "category." msgstr "" +"Vybraná scéna '%s' neexistuje, vybrat platnou? \n" +"PozdÄ›ji to můžete zmÄ›nit v \"Nastavenà projektu\" v kategorii 'application'." #: editor/editor_node.cpp msgid "" @@ -2782,24 +2791,28 @@ msgstr "Nasazenà se vzdáleným ladÄ›nÃm" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"PÅ™i exportu nebo nasazenÃ, se výsledný spustitelný soubor pokusà pÅ™ipojit k " -"IP tohoto poÄÃtaÄe, aby ho bylo možné ladit." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Minimálnà nasazenà se sÃÅ¥ovým FS" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Když je tato možnost povolena, export nebo nasazenà bude vytvářet minimálnà " "spustitelný soubor.\n" @@ -2812,9 +2825,10 @@ msgid "Visible Collision Shapes" msgstr "Viditelné koliznà tvary" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Koliznà tvary a raycast uzly (pro 2D a 3D) budou viditelné bÄ›hem hry, po " "aktivaci této volby." @@ -2824,22 +2838,25 @@ msgid "Visible Navigation" msgstr "Viditelná navigace" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "NavigaÄnà meshe a polygony budou viditelné bÄ›hem hry, po aktivaci této volby." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Synchronizovat zmÄ›ny scény" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Když je zapnuta tato možnost, vÅ¡echny zmÄ›ny provedené ve scénÄ› v editoru " "budou replikovány v běžÃcà hÅ™e.\n" @@ -2847,15 +2864,17 @@ msgstr "" "sÃÅ¥ového souborového systému." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Synchornizace zmÄ›n skriptu" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Když je zapnuta tato volba, jakýkoliv skript, který je uložen bude znovu " "nahrán do spuÅ¡tÄ›né hry.\n" @@ -2922,7 +2941,7 @@ msgstr "NápovÄ›da" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Hledat" @@ -3186,7 +3205,7 @@ msgstr "Fyzikálnà snÃmek %" #: editor/editor_profiler.cpp msgid "Inclusive" -msgstr "" +msgstr "InkluzivnÃ" #: editor/editor_profiler.cpp msgid "Self" @@ -3325,9 +3344,11 @@ msgid "Add Key/Value Pair" msgstr "Vložte pár klÃÄ/hodnota" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Nebylo nalezeno žádné spustilené pÅ™ednastavenà pro exportovánà na tuto " "platformu.\n" @@ -3365,8 +3386,9 @@ msgstr "" "podpisu." #: editor/editor_sub_scene.cpp +#, fuzzy msgid "Select Node(s) to Import" -msgstr "" +msgstr "Vyberte uzly (Node) pro import" #: editor/editor_sub_scene.cpp editor/project_manager.cpp msgid "Browse" @@ -3374,7 +3396,7 @@ msgstr "Procházet" #: editor/editor_sub_scene.cpp msgid "Scene Path:" -msgstr "" +msgstr "Cesta ke scénÄ›:" #: editor/editor_sub_scene.cpp msgid "Import From Node:" @@ -3946,16 +3968,17 @@ msgid "Running Custom Script..." msgstr "" #: editor/import/resource_importer_scene.cpp +#, fuzzy msgid "Couldn't load post-import script:" -msgstr "" +msgstr "NepodaÅ™ilo se naÄÃst post-import script:" #: editor/import/resource_importer_scene.cpp msgid "Invalid/broken script for post-import (check console):" -msgstr "" +msgstr "Neplatný/rozbitý skript pro post-import (viz konzole):" #: editor/import/resource_importer_scene.cpp msgid "Error running post-import script:" -msgstr "" +msgstr "Chyba pÅ™i spuÅ¡tÄ›nà post-import scriptu:" #: editor/import/resource_importer_scene.cpp msgid "Did you return a Node-derived object in the `post_import()` method?" @@ -4040,7 +4063,7 @@ msgstr "" #: editor/inspector_dock.cpp msgid "Make Sub-Resources Unique" -msgstr "" +msgstr "UdÄ›lat Sub-prostÅ™edky unikátnÃ" #: editor/inspector_dock.cpp msgid "Open in Help" @@ -4420,7 +4443,7 @@ msgstr "Povolit filtrovánÃ" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Toggle Autoplay" -msgstr "" +msgstr "Zapnout Autoplay" #: editor/plugins/animation_player_editor_plugin.cpp msgid "New Animation Name:" @@ -4463,7 +4486,7 @@ msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Change Blend Time" -msgstr "" +msgstr "ZmÄ›nit Blend Time" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Load Animation" @@ -4518,8 +4541,9 @@ msgid "Animation position (in seconds)." msgstr "Pozice animace (v sekundách)." #: editor/plugins/animation_player_editor_plugin.cpp +#, fuzzy msgid "Scale animation playback globally for the node." -msgstr "" +msgstr "Å kálovat playback animace globálnÄ› pro uzel" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Animation Tools" @@ -4542,8 +4566,9 @@ msgid "Display list of animations in player." msgstr "Zobrazit seznam animacà v pÅ™ehrávaÄi." #: editor/plugins/animation_player_editor_plugin.cpp +#, fuzzy msgid "Autoplay on Load" -msgstr "" +msgstr "Autoplay pÅ™i naÄtenÃ" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Enable Onion Skinning" @@ -4620,7 +4645,7 @@ msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Next (Auto Queue):" -msgstr "" +msgstr "DalÅ¡Ã (Automatická Å™ada):" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Cross-Animation Blend Times" @@ -4734,8 +4759,9 @@ msgid "Scale:" msgstr "ZvÄ›tÅ¡enÃ:" #: editor/plugins/animation_tree_player_editor_plugin.cpp +#, fuzzy msgid "Fade In (s):" -msgstr "" +msgstr "Zmizenà do (s):" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Fade Out (s):" @@ -4755,11 +4781,11 @@ msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Restart (s):" -msgstr "" +msgstr "Restart (s):" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Random Restart (s):" -msgstr "" +msgstr "Náhodný Restart (s):" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Start!" @@ -4794,7 +4820,7 @@ msgstr "PÅ™idat vstup" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Clear Auto-Advance" -msgstr "" +msgstr "ÄŒistý Auto-Advance" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Set Auto-Advance" @@ -5085,7 +5111,7 @@ msgid "Bake Lightmaps" msgstr "Zapéct lightmapy" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Náhled" @@ -7767,7 +7793,8 @@ msgid "New Animation" msgstr "Nová animace" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "Rychlost (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10332,11 +10359,18 @@ msgid "Batch Rename" msgstr "Dávkové pÅ™ejmenovánÃ" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Nahradit: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "Prefix" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "Sufix" #: editor/rename_dialog.cpp @@ -10384,7 +10418,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10444,7 +10478,8 @@ msgid "Reset" msgstr "Resetovat" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "Chyba regulárnÃho výrazu" #: editor/rename_dialog.cpp @@ -12487,6 +12522,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12772,6 +12812,17 @@ msgstr "OdliÅ¡nosti mohou být pÅ™iÅ™azeny pouze ve vertex funkci." msgid "Constants cannot be modified." msgstr "Konstanty nenà možné upravovat." +#, fuzzy +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Souborový systém" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "PÅ™i exportu nebo nasazenÃ, se výsledný spustitelný soubor pokusà pÅ™ipojit " +#~ "k IP tohoto poÄÃtaÄe, aby ho bylo možné ladit." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "Aktuálnà scéna nebyla nikdy uložena, prosÃm uložte jà pÅ™ed spuÅ¡tÄ›nÃm." diff --git a/editor/translations/da.po b/editor/translations/da.po index 6925853253..95a5d793e0 100644 --- a/editor/translations/da.po +++ b/editor/translations/da.po @@ -560,6 +560,7 @@ msgid "Seconds" msgstr "Sekunder" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -743,7 +744,7 @@ msgstr "Match stor/lille" msgid "Whole Words" msgstr "Hele Ord" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Erstat" @@ -947,6 +948,11 @@ msgid "Signals" msgstr "Signaler" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtrer filer..." + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Er du sikker pÃ¥ at du vil fjerne alle forbindelser fra dette signal?" @@ -984,7 +990,7 @@ msgid "Recent:" msgstr "Seneste:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Søgning:" @@ -1692,21 +1698,21 @@ msgstr "" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "Import Dock" -msgstr "Importer" - -#: editor/editor_feature_profile.cpp -#, fuzzy msgid "Node Dock" msgstr "Node Navn:" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "FileSystem and Import Docks" +msgid "FileSystem Dock" msgstr "Fil System" #: editor/editor_feature_profile.cpp #, fuzzy +msgid "Import Dock" +msgstr "Importer" + +#: editor/editor_feature_profile.cpp +#, fuzzy msgid "Erase profile '%s'? (no undo)" msgstr "Erstat Alle" @@ -1993,7 +1999,7 @@ msgstr "Mapper & Filer:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "ForhÃ¥ndsvisning:" @@ -2887,24 +2893,28 @@ msgstr "Indsætte med Fjern Fejlfind" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Ved eksport eller deploy, vil den resulterende eksekverbare fil forsøge at " -"oprette forbindelse til denne computers IP adresse for at blive debugged." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Lille Indsættelse med Nætværks FS" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "NÃ¥r denne indstilling er aktiveret, vil eksport eller deploy producere en " "minimal eksekverbar.\n" @@ -2917,9 +2927,10 @@ msgid "Visible Collision Shapes" msgstr "Synlig Kollisionsformer" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Kollisionsformer og raycast-noder (til 2D og 3D) vil være synlige pÃ¥ det " "kørende spil, hvis denne indstilling er tændt." @@ -2929,23 +2940,26 @@ msgid "Visible Navigation" msgstr "Synlig Navigation" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Navigationsmasker og polygoner vil være synlige pÃ¥ det kørende spil, hvis " "denne indstilling er tændt." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Synkroniser Scene Ændringer" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "NÃ¥r denne indstilling er tændt, vil eventuelle ændringer til scenen i " "editoren blive overført til det kørende spil.\n" @@ -2953,15 +2967,17 @@ msgstr "" "filsystem." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Synkroniser Script Ændringer" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "NÃ¥r denne indstilling er tændt, genindlæses gemte script, pÃ¥ det kørende " "spil.\n" @@ -3031,7 +3047,7 @@ msgstr "Hjælp" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Søg" @@ -3442,9 +3458,11 @@ msgid "Add Key/Value Pair" msgstr "" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Ingen kørbare eksport forudindstillinger fundet til denne platform.\n" "Tilføj venligst en kørbar forudindstilling i eksportmenuen." @@ -5307,7 +5325,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -8023,7 +8041,7 @@ msgid "New Animation" msgstr "Ny Animation Navn:" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10567,11 +10585,16 @@ msgid "Batch Rename" msgstr "Omdøb" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Erstat" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10622,7 +10645,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10684,7 +10707,7 @@ msgstr "Nulstil Zoom" #: editor/rename_dialog.cpp #, fuzzy -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "Skift udtryk" #: editor/rename_dialog.cpp @@ -12772,6 +12795,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -13051,6 +13079,18 @@ msgstr "" msgid "Constants cannot be modified." msgstr "Konstanter kan ikke ændres." +#, fuzzy +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Fil System" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Ved eksport eller deploy, vil den resulterende eksekverbare fil forsøge " +#~ "at oprette forbindelse til denne computers IP adresse for at blive " +#~ "debugged." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "Den nuværende scene er aldrig gemt, venligst gem før du kører den." diff --git a/editor/translations/de.po b/editor/translations/de.po index 3d9af3cdd4..082f22322b 100644 --- a/editor/translations/de.po +++ b/editor/translations/de.po @@ -58,12 +58,14 @@ # Dirk Federmann <weblategodot@dirkfedermann.de>, 2020. # Helmut Hirtes <helmut.h@gmx.de>, 2020. # Michal695 <michalek.jedrzejak@gmail.com>, 2020. +# Leon Marz <leon.marz@kabelmail.de>, 2020. +# Patric Wust <patric.wust@gmx.de>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-08-28 13:09+0000\n" -"Last-Translator: Michal695 <michalek.jedrzejak@gmail.com>\n" +"PO-Revision-Date: 2020-09-22 03:23+0000\n" +"Last-Translator: Patric Wust <patric.wust@gmx.de>\n" "Language-Team: German <https://hosted.weblate.org/projects/godot-engine/" "godot/de/>\n" "Language: de\n" @@ -71,7 +73,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.2.1-dev\n" +"X-Generator: Weblate 4.3-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -584,6 +586,7 @@ msgid "Seconds" msgstr "Sekunden" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -762,7 +765,7 @@ msgstr "Groß-/Kleinschreibung berücksichtigen" msgid "Whole Words" msgstr "Ganze Wörter" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Ersetzen" @@ -955,6 +958,11 @@ msgid "Signals" msgstr "Signale" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Kacheln filtern" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Sollen wirklich alle Verbindungen mit diesem Signal entfernt werden?" @@ -992,7 +1000,7 @@ msgid "Recent:" msgstr "Kürzlich:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Suche:" @@ -1200,14 +1208,12 @@ msgid "Gold Sponsors" msgstr "Gold-Sponsoren" #: editor/editor_about.cpp -#, fuzzy msgid "Silver Sponsors" -msgstr "Silber-Unterstützer" +msgstr "Silber-Sponsoren" #: editor/editor_about.cpp -#, fuzzy msgid "Bronze Sponsors" -msgstr "Bronze-Unterstützer" +msgstr "Bronze-Sponsoren" #: editor/editor_about.cpp msgid "Mini Sponsors" @@ -1687,16 +1693,17 @@ msgid "Scene Tree Editing" msgstr "Szenenbaum-Bearbeitung" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Importleiste" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Node-Leiste" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Dateisystem- und Import-Leiste" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Dateisystem" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Importleiste" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1961,7 +1968,7 @@ msgstr "Verzeichnisse & Dateien:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Vorschau:" @@ -2145,7 +2152,7 @@ msgstr "Eigenschaft:" #: editor/editor_inspector.cpp msgid "Set" -msgstr "Festlegen" +msgstr "Set" #: editor/editor_inspector.cpp msgid "Set Multiple:" @@ -2844,7 +2851,7 @@ msgstr "Zur Projektverwaltung zurückkehren" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/project_export.cpp msgid "Debug" -msgstr "Debuggen" +msgstr "Fehlersuche (debuggen)" #: editor/editor_node.cpp msgid "Deploy with Remote Debug" @@ -2852,24 +2859,28 @@ msgstr "Mit Fern-Fehlerbehebung starten" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Beim Exportieren oder Starten wird das Programm versuchen, sich mit der IP-" -"Adresse dieses Computers zu verbinden, um Fehler beheben zu können." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Kleine Programmdatei über ein Netzwerkdateisystem" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Wenn diese Option aktiviert ist, wird das Exportieren bzw. Starten nur eine " "kleine Programmdatei erzeugen.\n" @@ -2883,9 +2894,10 @@ msgid "Visible Collision Shapes" msgstr "Collision-Shapes sichtbar" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Collision-Shapes und Raycast-Nodes (für 2D und 3D) werden im laufenden Spiel " "angezeigt, falls diese Option aktiviert ist." @@ -2895,23 +2907,26 @@ msgid "Visible Navigation" msgstr "Navigation sichtbar" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Navigations- Meshes und Polygone werden im laufenden Spiel sichtbar sein " "wenn diese Option gewählt ist." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Szenenänderungen synchronisieren" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Wenn diese Option gewählt ist, werden jegliche Änderungen der Szene im " "Editor im laufenden Spiel dargestellt.\n" @@ -2919,15 +2934,17 @@ msgstr "" "effizientesten das Netzwerk-Dateisystem zu nutzen." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Skriptänderungen synchronisieren" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Wenn diese Option gewählt ist, werden erneut gespeicherte Skripte während " "des laufenden Spiels neu geladen.\n" @@ -2992,7 +3009,7 @@ msgstr "Hilfe" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Suchen" @@ -3015,7 +3032,7 @@ msgstr "Dokumentationsvorschläge senden" #: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp msgid "Community" -msgstr "Gemeinschaft" +msgstr "Community" #: editor/editor_node.cpp msgid "About" @@ -3411,9 +3428,11 @@ msgid "Add Key/Value Pair" msgstr "Schlüssel-Wert-Paar hinzufügen" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Keine Soforteinsatz-Exportvorlage für diese Plattform gefunden.\n" "Im Exportmenü kann eine Vorlage als Soforteinsatz markiert werden." @@ -5189,7 +5208,7 @@ msgid "Bake Lightmaps" msgstr "Lightmaps vorrendern" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Vorschau" @@ -7852,7 +7871,8 @@ msgid "New Animation" msgstr "Neue Animation" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "Geschwindigkeit (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10431,11 +10451,18 @@ msgid "Batch Rename" msgstr "Stapelweise Umbenennung" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Ersetzen: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "Prefix" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "Suffix" #: editor/rename_dialog.cpp @@ -10483,7 +10510,8 @@ msgid "Per-level Counter" msgstr "Pro-Ebene-Zähler" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "" "Falls gesetzt startet dieser Zähler für jede Gruppe aus Unterobjekten neu" @@ -10544,7 +10572,8 @@ msgid "Reset" msgstr "Zurücksetzen" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "Fehler in regulärem Ausdruck" #: editor/rename_dialog.cpp @@ -12644,6 +12673,11 @@ msgstr "" "GIProbes werden vom GLES2-Videotreiber nicht unterstützt.\n" "BakedLightmaps können als Alternative verwendet werden." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12966,6 +13000,16 @@ msgstr "Varyings können nur in Vertex-Funktion zugewiesen werden." msgid "Constants cannot be modified." msgstr "Konstanten können nicht verändert werden." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Dateisystem- und Import-Leiste" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Beim Exportieren oder Starten wird das Programm versuchen, sich mit der " +#~ "IP-Adresse dieses Computers zu verbinden, um Fehler beheben zu können." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "Die aktuelle Szene wurde noch nicht gespeichert, bitte vor dem Abspielen " diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot index e544f254cd..743e77d7dd 100644 --- a/editor/translations/editor.pot +++ b/editor/translations/editor.pot @@ -502,6 +502,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -680,7 +681,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "" @@ -869,6 +870,10 @@ msgid "Signals" msgstr "" #: editor/connections_dialog.cpp +msgid "Filter signals" +msgstr "" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -906,7 +911,7 @@ msgid "Recent:" msgstr "" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "" @@ -1575,15 +1580,15 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" +msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Node Dock" +msgid "FileSystem Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1846,7 +1851,7 @@ msgstr "" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2671,22 +2676,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2695,8 +2704,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2705,32 +2714,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2790,7 +2799,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3190,7 +3199,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -4914,7 +4924,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7496,7 +7506,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -9903,11 +9913,15 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +msgid "Replace:" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -9953,7 +9967,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10011,7 +10025,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -11940,6 +11954,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/el.po b/editor/translations/el.po index 34ca85d1bd..2571598414 100644 --- a/editor/translations/el.po +++ b/editor/translations/el.po @@ -536,6 +536,7 @@ msgid "Seconds" msgstr "ΔευτεÏόλεπτα" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -714,7 +715,7 @@ msgstr "Αντιστοίχηση πεζών-κεφαλαίων" msgid "Whole Words" msgstr "ΟλόκληÏες λÎξεις" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Αντικατάσταση" @@ -908,6 +909,11 @@ msgid "Signals" msgstr "Σήματα" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "ΦιλτÏάÏισμα πλακιδίων" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" "Είστε σίγουÏοι πως θÎλετε να αφαιÏÎσετε όλες της συνδÎσεις απο αυτό το σήμα;" @@ -946,7 +952,7 @@ msgid "Recent:" msgstr "Î Ïόσφατα:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Αναζήτηση:" @@ -1638,16 +1644,17 @@ msgid "Scene Tree Editing" msgstr "ΕπεξεÏγασία ΔÎντÏου Σκηνής" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "ΠλατφόÏμα Εισαγωγής" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "ΠλατφόÏμα Κόμβου" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "ΠλατφόÏμες Συστήματος ΑÏχείων και Εισαγωγής" +#, fuzzy +msgid "FileSystem Dock" +msgstr "ΣÏστημα αÏχείων" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "ΠλατφόÏμα Εισαγωγής" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1910,7 +1917,7 @@ msgstr "Φάκελοι & ΑÏχεία:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Î Ïοεπισκόπηση:" @@ -2799,24 +2806,28 @@ msgstr "ΑνÎπτυξε με απομακÏυσμÎνο εντοπισμό σφ #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Όταν εξάγετε ή αναπτÏσσετε, το παÏαγόμενο εκτελÎσιμο θα Ï€Ïοσπαθήσει να " -"συνδεθεί στην IP Î±Ï…Ï„Î¿Ï Ï„Î¿Ï… υπολογιστή για να αποσφαλματωθεί." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "ΜικÏή ανάπτυξη με δικτυωμÎνο σÏστημα αÏχείων" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Όταν ενεÏγοποιείται αυτή η επιλογή, η εξαγωγή ή η ανάπτυξη θα παÏάξουν Îνα " "ελαχιστοποιημÎνο εκτελÎσιμο.\n" @@ -2830,9 +2841,10 @@ msgid "Visible Collision Shapes" msgstr "ΟÏατά σχήματα σÏγκÏουσης" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Σχήματα σÏγκÏουσης και κόμβοι raycast (για 2D και 3D) θα είναι οÏατά στο " "παιχνίδι εάν αυτή η επιλογή είναι ενεÏγοποιημÎνη." @@ -2842,23 +2854,26 @@ msgid "Visible Navigation" msgstr "ΟÏατή πλοήγηση" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Τα πλÎγματα πλοήγησης και τα πολÏγονα θα είναι οÏατά στο παιχνίδι εάν αυτή η " "επιλογή είναι ενεÏγοποιημÎνη." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "ΣυγχÏονισμός αλλαγών στη σκηνή" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Η ενεÏγοποίηση της επιλογής αυτής θα συγχÏονίσει αλλαγÎÏ‚ της σκηνής εντός " "του επεξεÏγαστή με το παιχνίδι που εκτελείται.\n" @@ -2866,15 +2881,17 @@ msgstr "" "σÏστημα αÏχείων." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "ΣυγχÏονισμός αλλαγών στις δεσμÎÏ‚ ενεÏγειών" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Η ενεÏγοποίηση της επιλογής αυτής θα συγχÏονίσει κάθε δÎσμη ενεÏγειών που " "αποθηκεÏεται με το παιχνίδι που εκτελείται.\n" @@ -2940,7 +2957,7 @@ msgstr "Βοήθεια" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Αναζήτηση" @@ -3360,9 +3377,11 @@ msgid "Add Key/Value Pair" msgstr "Î Ïοσθήκη ζεÏγους κλειδιοÏ/τιμής" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Δεν βÏÎθηκε εκτελÎσιμη διαμόÏφωση εξαγωγής για αυτή την πλατφόÏμα.\n" "ΠαÏακαλοÏμε Ï€ÏοσθÎστε μία εκτελÎσιμη διαμόÏφωση στο Î¼ÎµÎ½Î¿Ï ÎµÎ¾Î±Î³Ï‰Î³Î®Ï‚." @@ -5140,7 +5159,7 @@ msgid "Bake Lightmaps" msgstr "Î Ïοετοιμασία Lightmaps" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Î Ïοεπισκόπηση" @@ -7806,7 +7825,8 @@ msgid "New Animation" msgstr "ÎÎα Κίνηση" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "ΤαχÏτητα (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10378,11 +10398,18 @@ msgid "Batch Rename" msgstr "Ομαδική Μετονομασία" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Αντικατάσταση: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "Î Ïόθεμα" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "Επίθεμα" #: editor/rename_dialog.cpp @@ -10430,7 +10457,8 @@ msgid "Per-level Counter" msgstr "ΜετÏητής Ανά Επίπεδο" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "Εάν ο μετÏητής επανεκκινείται για κάθε ομάδα παιδικών κόμβων" #: editor/rename_dialog.cpp @@ -10490,7 +10518,8 @@ msgid "Reset" msgstr "ΕπαναφοÏά" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "Σφάλμα Κανονικής ΕκφÏάσεως" #: editor/rename_dialog.cpp @@ -12596,6 +12625,11 @@ msgstr "" "Τα GIProbes δεν υποστηÏίζονται από το Ï€ÏόγÏαμμα οδήγησης οθόνης GLES2.\n" "Εναλλακτικά, χÏησιμοποιήστε Îνα BakedLightmap." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12908,6 +12942,16 @@ msgstr "Τα «varying» μποÏοÏν να ανατεθοÏν μόνο στηΠmsgid "Constants cannot be modified." msgstr "Οι σταθεÏÎÏ‚ δεν μποÏοÏν να Ï„ÏοποποιηθοÏν." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "ΠλατφόÏμες Συστήματος ΑÏχείων και Εισαγωγής" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Όταν εξάγετε ή αναπτÏσσετε, το παÏαγόμενο εκτελÎσιμο θα Ï€Ïοσπαθήσει να " +#~ "συνδεθεί στην IP Î±Ï…Ï„Î¿Ï Ï„Î¿Ï… υπολογιστή για να αποσφαλματωθεί." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "Η Ï„ÏÎχουσα σκηνή δεν Îχει αποθηκευτεί, αποθηκεÏστε Ï€Ïιν να Ï„ÏÎξετε το " diff --git a/editor/translations/eo.po b/editor/translations/eo.po index 8595625d56..68dbd4f436 100644 --- a/editor/translations/eo.po +++ b/editor/translations/eo.po @@ -531,6 +531,7 @@ msgid "Seconds" msgstr "Sekundoj" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -713,7 +714,7 @@ msgstr "Kongrui Usklon" msgid "Whole Words" msgstr "Plenaj Vortoj" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "AnstataÅigi" @@ -908,6 +909,11 @@ msgid "Signals" msgstr "Signaloj" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtri nodojn" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -945,7 +951,7 @@ msgid "Recent:" msgstr "" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Serĉo:" @@ -1621,16 +1627,17 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Enporti dokon" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Dosiersistema kaj enporta dokoj" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Dosiersistemo" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Enporti dokon" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1896,7 +1903,7 @@ msgstr "Dosierujoj kaj dosieroj:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2748,24 +2755,28 @@ msgstr "Disponigii kun defora sencimigo" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Kiam eksportas aÅ malfaldas, la rezulta plenumebla provos konekti al la IP " -"de ĉi tiu komputilo por estos sencimigita." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Eta disponigo kun reta dosiersistemo" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Kiam ĉi tiun agordon estas Åaltita, eksporti aÅ malfaldi produktos minimuman " "plenumeblan dosieron.\n" @@ -2778,9 +2789,10 @@ msgid "Visible Collision Shapes" msgstr "Videblaj koliziaj formoj" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Koliziaj formoj kaj radĵetaj nodoj (por 2D kaj 3D) estos videblaj en la " "rulas ludo, se ĉi tiu agordo estas Åaltita." @@ -2790,38 +2802,43 @@ msgid "Visible Navigation" msgstr "Videbla navigacio" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Navigaciaj maÅoj kaj poligonoj estos videblaj en la rulas ludo, se ĉi tiu " "agordo estas Åaltita." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Sinkronigi scenan ÅanÄojn" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Kiam tuin ĉi agordo estas Åaltita, iuj ÅanÄoj ke faris al la scenon en la " "editilo replikos en la rulas ludo.\n" "Kiam uzantis malproksime en aparato, estas pli efika kun reta dosiersistemo." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Sinkronigi skriptajn ÅanÄojn" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Kiam tuin ĉi agordo estas Åaltita, iun skripton ke konservita, estos " "reÅarÄita en la rulas ludo.\n" @@ -2884,7 +2901,7 @@ msgstr "Helpo" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Serĉo" @@ -3289,7 +3306,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -5027,7 +5045,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7622,7 +7640,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10053,11 +10071,16 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "AnstataÅigi: " + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10103,7 +10126,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10161,7 +10184,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -12113,6 +12136,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12366,6 +12394,16 @@ msgstr "" msgid "Constants cannot be modified." msgstr "Konstantoj ne povas esti modifitaj." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Dosiersistema kaj enporta dokoj" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Kiam eksportas aÅ malfaldas, la rezulta plenumebla provos konekti al la " +#~ "IP de ĉi tiu komputilo por estos sencimigita." + #~ msgid "Revert" #~ msgstr "Malfari" diff --git a/editor/translations/es.po b/editor/translations/es.po index 9092ba4566..fa8391cf89 100644 --- a/editor/translations/es.po +++ b/editor/translations/es.po @@ -50,12 +50,13 @@ # Pedro J. Estébanez <pedrojrulez@gmail.com>, 2020. # paco <pacosoftfree@protonmail.com>, 2020. # Jonatan <arandajonatan94@tuta.io>, 2020. +# ACM <albertocm@tuta.io>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-07-31 03:47+0000\n" -"Last-Translator: Lisandro Lorea <lisandrolorea@gmail.com>\n" +"PO-Revision-Date: 2020-09-12 00:46+0000\n" +"Last-Translator: ACM <albertocm@tuta.io>\n" "Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/" "godot/es/>\n" "Language: es\n" @@ -63,7 +64,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.2-dev\n" +"X-Generator: Weblate 4.3-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -580,6 +581,7 @@ msgid "Seconds" msgstr "Segundos" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -758,7 +760,7 @@ msgstr "Coincidir Mayús./Minús." msgid "Whole Words" msgstr "Palabras Completas" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Reemplazar" @@ -952,6 +954,11 @@ msgid "Signals" msgstr "Señales" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtrar tiles" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" "¿Estás seguro/a que quieres eliminar todas las conexiones de esta señal?" @@ -990,7 +997,7 @@ msgid "Recent:" msgstr "Recientes:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Buscar:" @@ -1196,14 +1203,12 @@ msgid "Gold Sponsors" msgstr "Patrocinadores Oro" #: editor/editor_about.cpp -#, fuzzy msgid "Silver Sponsors" -msgstr "Donantes Plata" +msgstr "Patrocinadores Plata" #: editor/editor_about.cpp -#, fuzzy msgid "Bronze Sponsors" -msgstr "Donantes Bronce" +msgstr "Patrocinadores Bronce" #: editor/editor_about.cpp msgid "Mini Sponsors" @@ -1683,16 +1688,17 @@ msgid "Scene Tree Editing" msgstr "Editor del Ãrbol de Escenas" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Importación" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Nodos" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Sistema de Archivo e Importación" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Sistema de Archivos" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Importación" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1958,7 +1964,7 @@ msgstr "Directorios y Archivos:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Vista Previa:" @@ -2846,24 +2852,28 @@ msgstr "Exportar con Depuración Remota" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Al exportar o distribuir, el ejecutable generado intentará conectarse a la " -"IP de este equipo para ser depurado." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Exportación Mini con Recursos en Red" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Cuando esta opción está activa, al exportar o publicar se creará un " "ejecutable mÃnimo.\n" @@ -2876,9 +2886,10 @@ msgid "Visible Collision Shapes" msgstr "Ver Formas de Colisión" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Las formas de colisión y los nodos raycast (para 2D y 3D) serán visibles " "durante la ejecución del juego si esta opción está activada." @@ -2888,23 +2899,26 @@ msgid "Visible Navigation" msgstr "Navegación Visible" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Las mallas de navegación y los polÃgonos serán visibles durante la ejecución " "del juego si esta opción está activada." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Sincronizar cambios de escena" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Cuando esta opción este activada, cualquier cambio hecho a la escena en el " "editor sera replicado en el juego en ejecución.\n" @@ -2912,15 +2926,17 @@ msgstr "" "sistema de archivos remoto." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Sincronizar Cambios en Scripts" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Cuando esta opción esté activa, cualquier script que se guarde se volverá a " "cargar en el juego en ejecución.\n" @@ -2986,7 +3002,7 @@ msgstr "Ayuda" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Buscar" @@ -3407,9 +3423,11 @@ msgid "Add Key/Value Pair" msgstr "Agregar Par Clave/Valor" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "No se ha encontrado ningún preset de exportación ejecutable para esta " "plataforma.\n" @@ -5186,7 +5204,7 @@ msgid "Bake Lightmaps" msgstr "Bake Lightmaps" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Vista Previa" @@ -7844,7 +7862,8 @@ msgid "New Animation" msgstr "Nueva Animación" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "Velocidad (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10419,11 +10438,18 @@ msgid "Batch Rename" msgstr "Renombrar por lote" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Reemplazar: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "Prefijo" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "Sufijo" #: editor/rename_dialog.cpp @@ -10471,7 +10497,8 @@ msgid "Per-level Counter" msgstr "Contador Por Nivel" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "Si esta activo el contador reinicia por cada grupo de nodos hijos" #: editor/rename_dialog.cpp @@ -10531,7 +10558,8 @@ msgid "Reset" msgstr "Resetear" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "Error de Expresión Regular" #: editor/rename_dialog.cpp @@ -12638,6 +12666,11 @@ msgstr "" "Las GIProbes no están soportadas por el controlador de vÃdeo GLES2.\n" "Usa un BakedLightmap en su lugar." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12951,6 +12984,16 @@ msgstr "Solo se pueden asignar variaciones en funciones de vértice." msgid "Constants cannot be modified." msgstr "Las constantes no pueden modificarse." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Sistema de Archivo e Importación" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Al exportar o distribuir, el ejecutable generado intentará conectarse a " +#~ "la IP de este equipo para ser depurado." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "La escena actual nunca se guardó. Por favor, guárdela antes de ejecutar." diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po index d9255df906..6171c0e27d 100644 --- a/editor/translations/es_AR.po +++ b/editor/translations/es_AR.po @@ -542,6 +542,7 @@ msgid "Seconds" msgstr "Segundos" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -720,7 +721,7 @@ msgstr "Coincidir Mayúsculas/Minúsculas" msgid "Whole Words" msgstr "Palabras Completas" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Reemplazar" @@ -914,6 +915,11 @@ msgid "Signals" msgstr "Señales" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtrar tiles" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "¿Estás seguro/a que querés quitar todas las conexiones de esta señal?" @@ -951,7 +957,7 @@ msgid "Recent:" msgstr "Recientes:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Buscar:" @@ -1643,16 +1649,17 @@ msgid "Scene Tree Editing" msgstr "Edición de Ãrbol de Escenas" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Dock de Importación" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Dock de Nodos" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Docks de Sistema de Archivos e Importación" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Sistema de Archivos" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Dock de Importación" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1918,7 +1925,7 @@ msgstr "Directorios y Archivos:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Vista Previa:" @@ -2806,24 +2813,28 @@ msgstr "Hacer Deploy con Depuración Remota" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Al exportar o hacer deploy, el ejecutable resultante tratara de conectarse a " -"la IP de esta computadora de manera de ser depurado." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Deploy Pequeño con recursos en red" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Cuando esta opción está activa, exportar o hacer deploy producirá un " "ejecutable mÃnimo.\n" @@ -2837,9 +2848,10 @@ msgid "Visible Collision Shapes" msgstr "Collision Shapes Visibles" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Los Collision shapes y nodos raycast (para 2D y 3D) serán visibles durante " "la ejecución del juego cuando esta opción queda activada." @@ -2849,23 +2861,26 @@ msgid "Visible Navigation" msgstr "Navegación Visible" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Los meshes de navegación y los polÃgonos serán visibles durante la ejecución " "del juego si esta opción queda activada." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Sincronizar Cambios de Escena" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Cuando esta opción esté encendida, cualquier cambio hecho a la escena en el " "editor será replicado en el juego en ejecución.\n" @@ -2873,15 +2888,17 @@ msgstr "" "sistema de archivos remoto." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Sincronizar Cambios en Scripts" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Cuando esta opción está activa, cualquier script que se guarde sera vuelto a " "cargar en el juego en ejecución.\n" @@ -2945,7 +2962,7 @@ msgstr "Ayuda" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Buscar" @@ -3365,9 +3382,11 @@ msgid "Add Key/Value Pair" msgstr "Agregar Par Clave/Valor" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "No se encontró ningún preset de exportación ejecutable para esta " "plataforma.\n" @@ -5144,7 +5163,7 @@ msgid "Bake Lightmaps" msgstr "Bake Lightmaps" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Vista Previa" @@ -7795,7 +7814,8 @@ msgid "New Animation" msgstr "Nueva Animación" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "Velocidad (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10370,11 +10390,18 @@ msgid "Batch Rename" msgstr "Renombrar en Masa" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Reemplazar: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "Prefijo" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "Sufijo" #: editor/rename_dialog.cpp @@ -10422,7 +10449,8 @@ msgid "Per-level Counter" msgstr "Contador Por Nivel" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "Si esta activo el contador reinicia por cada grupo de nodos hijos" #: editor/rename_dialog.cpp @@ -10482,7 +10510,8 @@ msgid "Reset" msgstr "Resetear" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "Error de Expresión Regular" #: editor/rename_dialog.cpp @@ -12584,6 +12613,11 @@ msgstr "" "Las GIProbes no están soportadas por el controlador de video GLES2.\n" "Usá un BakedLightmap en su lugar." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12892,6 +12926,16 @@ msgstr "Solo se pueden asignar variaciones en funciones de vértice." msgid "Constants cannot be modified." msgstr "Las constantes no pueden modificarse." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Docks de Sistema de Archivos e Importación" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Al exportar o hacer deploy, el ejecutable resultante tratara de " +#~ "conectarse a la IP de esta computadora de manera de ser depurado." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "La escena actual nunca se guardó. Favor de guardarla antes de ejecutar." diff --git a/editor/translations/et.po b/editor/translations/et.po index d3e7c9e930..a8692d1332 100644 --- a/editor/translations/et.po +++ b/editor/translations/et.po @@ -515,6 +515,7 @@ msgid "Seconds" msgstr "Sekundid" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "K/S" @@ -693,7 +694,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "" @@ -882,6 +883,11 @@ msgid "Signals" msgstr "Signaalid" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtreeri sõlmed" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -919,7 +925,7 @@ msgid "Recent:" msgstr "Hiljutised:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Otsi:" @@ -1601,15 +1607,16 @@ msgid "Scene Tree Editing" msgstr "Stseenipuu redigeerimine" #: editor/editor_feature_profile.cpp -msgid "Import Dock" +msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Node Dock" -msgstr "" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Failikuvaja" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1875,7 +1882,7 @@ msgstr "Kataloogid ja failid:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Eelvaade:" @@ -2712,22 +2719,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2736,8 +2747,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2746,32 +2757,34 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" -msgstr "" +#, fuzzy +msgid "Synchronize Scene Changes" +msgstr "Pinna muutused" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" -msgstr "" +#, fuzzy +msgid "Synchronize Script Changes" +msgstr "Varjutaja muutused" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2831,7 +2844,7 @@ msgstr "Abi" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Otsi" @@ -3231,7 +3244,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -4955,7 +4969,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Eelvaade" @@ -7537,7 +7551,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -9946,11 +9960,15 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +msgid "Replace:" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -9996,7 +10014,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10054,7 +10072,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -11985,6 +12003,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/eu.po b/editor/translations/eu.po index 8042403f9d..07923f26fb 100644 --- a/editor/translations/eu.po +++ b/editor/translations/eu.po @@ -507,6 +507,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -685,7 +686,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "" @@ -874,6 +875,10 @@ msgid "Signals" msgstr "" #: editor/connections_dialog.cpp +msgid "Filter signals" +msgstr "" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -911,7 +916,7 @@ msgid "Recent:" msgstr "" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "" @@ -1587,15 +1592,15 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" +msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Node Dock" +msgid "FileSystem Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1858,7 +1863,7 @@ msgstr "Direktorioak eta fitxategiak:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Aurrebista:" @@ -2684,22 +2689,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2708,8 +2717,8 @@ msgstr "Talka formak ikusgai" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2718,32 +2727,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2803,7 +2812,7 @@ msgstr "Laguntza" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Bilatu" @@ -3203,7 +3212,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -4933,7 +4943,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7515,7 +7525,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -9927,11 +9937,15 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +msgid "Replace:" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -9977,7 +9991,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10035,7 +10049,8 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "Adierazpen erregularraren errorea" #: editor/rename_dialog.cpp @@ -11967,6 +11982,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/fa.po b/editor/translations/fa.po index dee4ae4030..2d17cc0abb 100644 --- a/editor/translations/fa.po +++ b/editor/translations/fa.po @@ -14,12 +14,13 @@ # Focus <saeeddashticlash@gmail.com>, 2019, 2020. # mohamad por <mohamad24xx@gmail.com>, 2020. # Tetra Homer <tetrahomer@gmail.com>, 2020. +# Farshad Faemiyi <ffaemiyi@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-07-21 13:41+0000\n" -"Last-Translator: Tetra Homer <tetrahomer@gmail.com>\n" +"PO-Revision-Date: 2020-09-16 18:09+0000\n" +"Last-Translator: Farshad Faemiyi <ffaemiyi@gmail.com>\n" "Language-Team: Persian <https://hosted.weblate.org/projects/godot-engine/" "godot/fa/>\n" "Language: fa\n" @@ -27,7 +28,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.2-dev\n" +"X-Generator: Weblate 4.3-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -416,7 +417,7 @@ msgstr "" #: editor/animation_track_editor.cpp msgid "Animation tracks can only point to AnimationPlayer nodes." -msgstr "" +msgstr "آهنگ های انیمیشن Ùقط Ù…ÛŒ توانند به گره های انیمش پلیر اشاره کنند." #: editor/animation_track_editor.cpp msgid "An animation player can't animate itself, only other players." @@ -452,7 +453,7 @@ msgstr "اÙزودن کلید مسیر" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a method key." -msgstr "" +msgstr "مسیر نامعتبر است ØŒ بنابراین نمی توانید یک کلید روش اضاÙÙ‡ کنید." #: editor/animation_track_editor.cpp msgid "Add Method Track Key" @@ -534,6 +535,7 @@ msgid "Seconds" msgstr "ثانیه ها" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "Ù„Øظه بر ثانیه" @@ -553,7 +555,7 @@ msgstr "خصوصیات انیمیشن." #: editor/animation_track_editor.cpp msgid "Copy Tracks" -msgstr "" +msgstr "Ú©Ù¾ÛŒ میسر ها" #: editor/animation_track_editor.cpp msgid "Scale Selection" @@ -593,7 +595,7 @@ msgstr "انیمیشن را پاکسازی Ú©Ù†" #: editor/animation_track_editor.cpp msgid "Pick the node that will be animated:" -msgstr "" +msgstr "گره متØرک را انتخاب کنید:" #: editor/animation_track_editor.cpp msgid "Use Bezier Curves" @@ -712,7 +714,7 @@ msgstr "بین Øرو٠کوچک Ùˆ بزرگ لاتین تمایز قائل شو msgid "Whole Words" msgstr "عین کلمات (بدون هیچ Ú©Ù… Ùˆ کاستی)" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "جایگزینی" @@ -751,11 +753,11 @@ msgstr "باز‌نشانی مقیاس" #: editor/code_editor.cpp msgid "Warnings" -msgstr "" +msgstr "هشدارها" #: editor/code_editor.cpp msgid "Line and column numbers." -msgstr "" +msgstr "شماره های خط Ùˆ ستون." #: editor/connections_dialog.cpp msgid "Method in target node must be specified." @@ -823,7 +825,7 @@ msgstr "پیشرÙته" #: editor/connections_dialog.cpp msgid "Deferred" -msgstr "معوق" +msgstr "به تعویق اÙتاده" #: editor/connections_dialog.cpp msgid "" @@ -896,12 +898,18 @@ msgstr "ویرایش اتصال:" #: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from the \"%s\" signal?" msgstr "" +"آیا مطمئن هستید Ú©Ù‡ Ù…ÛŒ خواهید همه اتصالات را از سیگنال \"Ùª s\" Øذ٠کنید؟" #: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp msgid "Signals" msgstr "سیگنال‌ها" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "صاÙÛŒ کردن گره‌ها" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -939,7 +947,7 @@ msgid "Recent:" msgstr "اخیر:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "جستجو:" @@ -994,7 +1002,7 @@ msgstr "منبع" #: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp #: editor/project_manager.cpp editor/project_settings_editor.cpp msgid "Path" -msgstr "مسیر" +msgstr "آدرس" #: editor/dependency_editor.cpp msgid "Dependencies:" @@ -1086,7 +1094,7 @@ msgstr "پوینده‌ی منبع جدا اÙتاده" #: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp #: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp msgid "Delete" -msgstr "ØØ°Ù Ú©Ù†" +msgstr "پاک" #: editor/dependency_editor.cpp msgid "Owns" @@ -1137,7 +1145,7 @@ msgstr "مؤلÙان" #: editor/editor_about.cpp msgid "Platinum Sponsors" -msgstr "Øامیان پلاتینیÙÙ… (درجه Û±)" +msgstr "Øامیان پلاتین" #: editor/editor_about.cpp msgid "Gold Sponsors" @@ -1155,7 +1163,7 @@ msgstr "اهداکنندگان برنزی" #: editor/editor_about.cpp msgid "Mini Sponsors" -msgstr "اسپانسر‌های Ú©ÙˆÚ†Ú©" +msgstr "Øامیان مالی Ú©ÙˆÚ†Ú©" #: editor/editor_about.cpp msgid "Gold Donors" @@ -1295,24 +1303,25 @@ msgstr "برای چینش مجدد، بکشید Ùˆ رها کنید." #: editor/editor_audio_buses.cpp msgid "Solo" -msgstr "" +msgstr "انÙرادی" #: editor/editor_audio_buses.cpp msgid "Mute" -msgstr "" +msgstr "بدون صدا" #: editor/editor_audio_buses.cpp msgid "Bypass" -msgstr "" +msgstr "‌گذرگاه Ùرعی" #: editor/editor_audio_buses.cpp +#, fuzzy msgid "Bus options" -msgstr "" +msgstr "گزینه های اتوبوس" #: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp #: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp msgid "Duplicate" -msgstr "" +msgstr "تکثیر کردن" #: editor/editor_audio_buses.cpp msgid "Reset Volume" @@ -1328,11 +1337,12 @@ msgstr "صدا" #: editor/editor_audio_buses.cpp msgid "Add Audio Bus" -msgstr "" +msgstr "اÙزودن کانل صوتی" #: editor/editor_audio_buses.cpp +#, fuzzy msgid "Master bus can't be deleted!" -msgstr "" +msgstr "استاد اتوبوس قابل Øذ٠نیست!" #: editor/editor_audio_buses.cpp msgid "Delete Audio Bus" @@ -1449,8 +1459,9 @@ msgid "Rename Autoload" msgstr "بارگذاری خودکار را تغییر نام بده" #: editor/editor_autoload_settings.cpp +#, fuzzy msgid "Toggle AutoLoad Globals" -msgstr "" +msgstr "تغییر Øالت اتماتیک لود عمومی" #: editor/editor_autoload_settings.cpp msgid "Move Autoload" @@ -1491,11 +1502,11 @@ msgstr "نام گره:" #: editor/editor_profiler.cpp editor/project_manager.cpp #: editor/settings_config_dialog.cpp msgid "Name" -msgstr "" +msgstr "نام" #: editor/editor_autoload_settings.cpp msgid "Singleton" -msgstr "" +msgstr "سینگلتون" #: editor/editor_data.cpp editor/inspector_dock.cpp msgid "Paste Params" @@ -1553,15 +1564,15 @@ msgstr "" #: editor/editor_export.cpp msgid "Storing File:" -msgstr "" +msgstr "ذخیره Ùایل:" #: editor/editor_export.cpp msgid "No export template found at the expected path:" -msgstr "" +msgstr "هیچ الگوی صادراتی در مسیر مورد انتظار یاÙت نشد:" #: editor/editor_export.cpp msgid "Packing" -msgstr "" +msgstr "بسته بندی" #: editor/editor_export.cpp msgid "" @@ -1620,16 +1631,17 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "وارد کردن لنگرگاه" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "لنگرگاه گره:" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Ùایل‌سیستم Ùˆ وارد‌کردن لنگرگاه" +#, fuzzy +msgid "FileSystem Dock" +msgstr "سامانه پرونده" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "وارد کردن لنگرگاه" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1771,7 +1783,7 @@ msgstr "گشودن در مدیر پرونده" #: editor/editor_file_dialog.cpp editor/editor_node.cpp #: editor/filesystem_dock.cpp editor/project_manager.cpp msgid "Show in File Manager" -msgstr "نمایش در مدیر پرونده" +msgstr "نمایش Ùایل داخلی مرجع" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "New Folder..." @@ -1891,7 +1903,7 @@ msgstr "پوشه‌ها Ùˆ پرونده‌ها:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2716,22 +2728,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2740,8 +2756,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2750,32 +2766,33 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" -msgstr "" +#, fuzzy +msgid "Synchronize Script Changes" +msgstr "تغییر بده" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2842,7 +2859,7 @@ msgstr "راهنما" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "جستجو" @@ -3259,7 +3276,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -3479,7 +3497,7 @@ msgstr "خطای اتصال" #: editor/export_template_manager.cpp msgid "SSL Handshake Error" -msgstr "دست دادن خطای اس اس ال" +msgstr "خطای اس اس ال اتÙاق اÙتاد است" #: editor/export_template_manager.cpp #, fuzzy @@ -5107,7 +5125,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7835,7 +7853,7 @@ msgid "New Animation" msgstr "تغییر نام انیمیشن" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10239,7 +10257,7 @@ msgstr "تنظیمات پروژه (پروژه.گودات)" #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "General" -msgstr "Ú©Ù„ÛŒ" +msgstr "عمومی" #: editor/project_settings_editor.cpp msgid "Override For..." @@ -10397,11 +10415,16 @@ msgid "Batch Rename" msgstr "تغییر نام" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "جایگزینی" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10451,7 +10474,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10513,7 +10536,7 @@ msgstr "بازنشانی بزرگنمایی" #: editor/rename_dialog.cpp #, fuzzy -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "انتقال را در انیمیشن تغییر بده" #: editor/rename_dialog.cpp @@ -12626,6 +12649,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12906,6 +12934,9 @@ msgstr "" msgid "Constants cannot be modified." msgstr "ثوابت قابل تغییر نیستند." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Ùایل‌سیستم Ùˆ وارد‌کردن لنگرگاه" + #~ msgid "Not in resource path." #~ msgstr "در مسیر٠منبع نیست." diff --git a/editor/translations/fi.po b/editor/translations/fi.po index bc8d755714..93bfde1e50 100644 --- a/editor/translations/fi.po +++ b/editor/translations/fi.po @@ -529,6 +529,7 @@ msgid "Seconds" msgstr "Sekunnit" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -707,7 +708,7 @@ msgstr "Huomioi kirjainkoko" msgid "Whole Words" msgstr "Kokonaisia sanoja" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Korvaa" @@ -899,6 +900,11 @@ msgid "Signals" msgstr "Signaalit" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Suodata laattoja" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Oletko varma, että haluat poistaa kaikki kytkennät tältä signaalilta?" @@ -936,7 +942,7 @@ msgid "Recent:" msgstr "Viimeaikaiset:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Hae:" @@ -1627,16 +1633,17 @@ msgid "Scene Tree Editing" msgstr "Skenepuun muokkaus" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Tuontitelakka" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Solmutelakka" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Tiedostojärjestelmä- ja tuontitelakat" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Tiedostojärjestelmä" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Tuontitelakka" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1902,7 +1909,7 @@ msgstr "Hakemistot ja tiedostot:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Esikatselu:" @@ -2773,24 +2780,28 @@ msgstr "Julkaise etätestauksen kanssa" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Vietäessä tai julkaistaessa, käynnistettävä ohjelma yrittää ottaa yhteyden " -"tämän tietokoneen IP-osoitteeseen testaamista varten." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Kevyt käyttöönotto verkkolevyn avulla" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Kun tämä on valittuna, vienti tai julkaisu tuottaa pienimmän mahdollisen " "käynnistystiedoston.\n" @@ -2804,9 +2815,10 @@ msgid "Visible Collision Shapes" msgstr "Näytä törmäysmuodot" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Törmäysmuodot ja raycast-solmut (2D ja 3D) ovat näkyvillä peliä ajettaessa " "tämän ollessa valittuna." @@ -2816,38 +2828,43 @@ msgid "Visible Navigation" msgstr "Näkyvä navigaatio" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Navigointiverkot ja niiden polygonit ovat näkyvillä peliä ajettaessa tämän " "ollessa valittuna." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Synkronoi skenen muutokset" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Tämän ollessa valittuna, kaikki skeneen tehdyt muutokset toteutetaan myös " "käynnissä olevassa pelissä.\n" "Mikäli peliä ajetaan etälaitteella, on tehokkaampaa käyttää verkkolevyä." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Synkronoi skriptin muutokset" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Jos tämä on valittu, kaikki tallennetut skriptit ladataan uudelleen pelin " "käynnistyessä.\n" @@ -2910,7 +2927,7 @@ msgstr "Ohje" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Hae" @@ -3328,9 +3345,11 @@ msgid "Add Key/Value Pair" msgstr "Lisää avain/arvopari" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Käynnistettävää vientipohjaa ei löytynyt tälle alustalle.\n" "Lisää sellainen vientivalikosta." @@ -5100,7 +5119,7 @@ msgid "Bake Lightmaps" msgstr "Kehitä Lightmapit" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Esikatselu" @@ -7748,7 +7767,8 @@ msgid "New Animation" msgstr "Uusi animaatio" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "Nopeus (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10313,11 +10333,18 @@ msgid "Batch Rename" msgstr "Niputettu uudelleennimeäminen" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Korvaa: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "Etuliite" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "Pääte" #: editor/rename_dialog.cpp @@ -10365,7 +10392,8 @@ msgid "Per-level Counter" msgstr "Per taso -laskuri" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "Jos asetettu, laskuri alkaa alusta jokaiselle alisolmujen ryhmälle" #: editor/rename_dialog.cpp @@ -10425,7 +10453,8 @@ msgid "Reset" msgstr "Palauta" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "Säännöllisen lausekkeen virhe" #: editor/rename_dialog.cpp @@ -12510,6 +12539,11 @@ msgstr "" "GIProbe ei ole tuettu GLES2 näyttöajurissa.\n" "Käytä sen sijaan BakedLightmap resurssia." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12817,6 +12851,16 @@ msgstr "Varying tyypin voi sijoittaa vain vertex-funktiossa." msgid "Constants cannot be modified." msgstr "Vakioita ei voi muokata." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Tiedostojärjestelmä- ja tuontitelakat" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Vietäessä tai julkaistaessa, käynnistettävä ohjelma yrittää ottaa " +#~ "yhteyden tämän tietokoneen IP-osoitteeseen testaamista varten." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "Nykyistä skeneä ei ole vielä tallennettu. Tallenna se ennen suorittamista." diff --git a/editor/translations/fil.po b/editor/translations/fil.po index 697692ac9c..de981e7625 100644 --- a/editor/translations/fil.po +++ b/editor/translations/fil.po @@ -515,6 +515,7 @@ msgid "Seconds" msgstr "Segundo" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -694,7 +695,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Palitan" @@ -883,6 +884,10 @@ msgid "Signals" msgstr "" #: editor/connections_dialog.cpp +msgid "Filter signals" +msgstr "" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -920,7 +925,7 @@ msgid "Recent:" msgstr "Kamakailan:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Paghahanap:" @@ -1589,15 +1594,15 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" +msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Node Dock" +msgid "FileSystem Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1860,7 +1865,7 @@ msgstr "" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2686,22 +2691,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2710,8 +2719,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2720,32 +2729,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2805,7 +2814,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3207,7 +3216,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -4932,7 +4942,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7518,7 +7528,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -9928,11 +9938,16 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Palitan" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -9978,7 +9993,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10036,7 +10051,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -11970,6 +11985,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/fr.po b/editor/translations/fr.po index d3ec3b7719..c39d4c7e0c 100644 --- a/editor/translations/fr.po +++ b/editor/translations/fr.po @@ -606,6 +606,7 @@ msgid "Seconds" msgstr "Secondes" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "IPS" @@ -784,7 +785,7 @@ msgstr "Sensible à la casse" msgid "Whole Words" msgstr "Mots entiers" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Remplacer" @@ -977,6 +978,11 @@ msgid "Signals" msgstr "Signaux" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtrer les tuiles" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Voulez-vous vraiment supprimer toutes les connexions de ce signal ?" @@ -1014,7 +1020,7 @@ msgid "Recent:" msgstr "Récents :" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Rechercher :" @@ -1705,16 +1711,17 @@ msgid "Scene Tree Editing" msgstr "Édition de l'arbre de scène" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Dock d'importation" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Dock nÅ“ud" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Module d'importation et système de fichiers" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Système de fichiers" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Dock d'importation" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1979,7 +1986,7 @@ msgstr "Répertoires et fichiers :" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Aperçu :" @@ -2872,24 +2879,28 @@ msgstr "Déployer avec le débogage distant" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Lors de l'exportation ou du déploiement, l'exécutable produit tentera de se " -"connecter à l'adresse IP de cet ordinateur afin de procéder au débogage." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Déploiement minime avec système de fichier réseau" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Lorsque cette option est activée, l'exportation ou le déploiement produira " "un exécutable minimal.\n" @@ -2904,9 +2915,10 @@ msgid "Visible Collision Shapes" msgstr "Formes de collision visibles" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Les formes de collision et les nÅ“uds de raycast (pour 2D et 3D) seront " "visibles en jeu si cette option est activée." @@ -2916,23 +2928,26 @@ msgid "Visible Navigation" msgstr "Navigation visible" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Les maillages et polygones de navigation seront visibles en jeu si cette " "option est activée." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Synchroniser les modifications des scènes" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Lorsque cette option est activée, toutes les modifications apportées à la " "scène dans l'éditeur seront reproduites en jeu.\n" @@ -2940,15 +2955,17 @@ msgstr "" "plus efficace avec le système de fichiers réseau." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Synchroniser les modifications des scripts" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Lorsque cette option est activée, tout script enregistré sera de nouveau " "chargé pendant le déroulement du jeu.\n" @@ -3013,7 +3030,7 @@ msgstr "Aide" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Rechercher" @@ -3433,9 +3450,11 @@ msgid "Add Key/Value Pair" msgstr "Ajouter une paire clé/valeur" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Aucun préréglage d'exportation exécutable trouvé pour cette plate-forme. \n" "Ajoutez un préréglage exécutable dans le menu d'exportation." @@ -5218,7 +5237,7 @@ msgid "Bake Lightmaps" msgstr "Précalculer les lightmaps" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Aperçu" @@ -7887,7 +7906,8 @@ msgid "New Animation" msgstr "Nouvelle animation" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "Vitesse (IPS) :" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10469,11 +10489,18 @@ msgid "Batch Rename" msgstr "Renommer par lot" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Remplacer : " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "Préfixe" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "Suffixe" #: editor/rename_dialog.cpp @@ -10521,7 +10548,8 @@ msgid "Per-level Counter" msgstr "Compteur par niveau" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "Si défini, le compteur redémarre pour chaque groupe de nÅ“uds enfant" #: editor/rename_dialog.cpp @@ -10581,7 +10609,8 @@ msgid "Reset" msgstr "Réinitialiser" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "Erreur dans l'expression régulière" #: editor/rename_dialog.cpp @@ -12695,6 +12724,11 @@ msgstr "" "Les GIProps ne sont pas supporter par le pilote de vidéos GLES2.\n" "A la place utilisez une BakedLightMap." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -13012,6 +13046,17 @@ msgstr "Les variations ne peuvent être affectées que dans la fonction vertex." msgid "Constants cannot be modified." msgstr "Les constantes ne peuvent être modifiées." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Module d'importation et système de fichiers" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Lors de l'exportation ou du déploiement, l'exécutable produit tentera de " +#~ "se connecter à l'adresse IP de cet ordinateur afin de procéder au " +#~ "débogage." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "La scène actuelle n'a jamais été sauvegardée, veuillez la sauvegarder " diff --git a/editor/translations/ga.po b/editor/translations/ga.po index d3733ca614..d727d2a1fa 100644 --- a/editor/translations/ga.po +++ b/editor/translations/ga.po @@ -508,6 +508,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -686,7 +687,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "" @@ -875,6 +876,11 @@ msgid "Signals" msgstr "" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "ScagairÃ..." + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -912,7 +918,7 @@ msgid "Recent:" msgstr "" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Cuardach:" @@ -1582,15 +1588,15 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" +msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Node Dock" +msgid "FileSystem Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1853,7 +1859,7 @@ msgstr "" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2680,22 +2686,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2704,8 +2714,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2714,32 +2724,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2799,7 +2809,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3199,7 +3209,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -4928,7 +4939,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7511,7 +7522,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -9923,11 +9934,15 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +msgid "Replace:" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -9973,7 +9988,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10031,7 +10046,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -11967,6 +11982,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/he.po b/editor/translations/he.po index 2661ed39ff..3a508c0d6d 100644 --- a/editor/translations/he.po +++ b/editor/translations/he.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-09-08 11:40+0000\n" +"PO-Revision-Date: 2020-09-24 12:43+0000\n" "Last-Translator: Ziv D <wizdavid@gmail.com>\n" "Language-Team: Hebrew <https://hosted.weblate.org/projects/godot-engine/" "godot/he/>\n" @@ -248,7 +248,7 @@ msgstr "×¤×•× ×§×¦×™×•×ª:" #: editor/animation_track_editor.cpp msgid "Audio Clips:" -msgstr "רצועות שמע:" +msgstr "קטעי שמע:" #: editor/animation_track_editor.cpp msgid "Anim Clips:" @@ -260,7 +260,7 @@ msgstr "החלפת × ×ª×™×‘ רצועה" #: editor/animation_track_editor.cpp msgid "Toggle this track on/off." -msgstr "הפעל/כבה רצועה." +msgstr "הפעלת/כיבוי רצועה זו." #: editor/animation_track_editor.cpp msgid "Update Mode (How this property is set)" @@ -272,7 +272,7 @@ msgstr "מצב ××™× ×˜×¨×¤×•×œ×¦×™×”" #: editor/animation_track_editor.cpp msgid "Loop Wrap Mode (Interpolate end with beginning on loop)" -msgstr "" +msgstr "מצב לול××” Wrap (××™× ×˜×¨×¤×•×œ×¦×™×” של הסוף ×¢× ×”×”×ª×—×œ×” בלול××”)" #: editor/animation_track_editor.cpp msgid "Remove this track." @@ -284,7 +284,7 @@ msgstr "זמן (×©× ×™×•×ª): " #: editor/animation_track_editor.cpp msgid "Toggle Track Enabled" -msgstr "" +msgstr "הפעלת/ביטול רצועה" #: editor/animation_track_editor.cpp msgid "Continuous" @@ -317,11 +317,11 @@ msgstr "מעוקב" #: editor/animation_track_editor.cpp msgid "Clamp Loop Interp" -msgstr "" +msgstr "××™× ×˜×¨×¤×•×œ×¦×™×ª לול××” מסוג Clamp" #: editor/animation_track_editor.cpp msgid "Wrap Loop Interp" -msgstr "" +msgstr "××™× ×˜×¨×¤×•×œ×¦×™×ª לול××” מסוג Wrap" #: editor/animation_track_editor.cpp #: editor/plugins/canvas_item_editor_plugin.cpp @@ -428,7 +428,7 @@ msgstr "× ×’×Ÿ ×”× ×¤×©×” ××™× ×• יכול ×œ×”× ×¤×™×© ×ת עצמו, רק ×©× #: editor/animation_track_editor.cpp msgid "Not possible to add a new track without a root" -msgstr "" +msgstr "××™ ×פשר להוסיף רצועה חדשה בלי שורש" #: editor/animation_track_editor.cpp msgid "Invalid track for Bezier (no suitable sub-properties)" @@ -467,9 +467,8 @@ msgid "Add Method Track Key" msgstr "הוספת רצועות חדשות." #: editor/animation_track_editor.cpp -#, fuzzy msgid "Method not found in object: " -msgstr "×œ× × ×ž×¦× VariableGet בסקריפט: " +msgstr "×œ× × ×ž×¦××” מתודה בעצ×: " #: editor/animation_track_editor.cpp msgid "Anim Move Keys" @@ -480,9 +479,8 @@ msgid "Clipboard is empty" msgstr "לוח העתקה ריק" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Paste Tracks" -msgstr "הדבקת ×ž×©×ª× ×™×" +msgstr "הדבקת רצועות" #: editor/animation_track_editor.cpp msgid "Anim Scale Keys" @@ -491,7 +489,7 @@ msgstr "" #: editor/animation_track_editor.cpp msgid "" "This option does not work for Bezier editing, as it's only a single track." -msgstr "" +msgstr "×פשרות זו ××™× ×” פעילה לעריכת בזייה, ×›×™ ×–×ת רק רצועה ×חת." #: editor/animation_track_editor.cpp msgid "" @@ -505,38 +503,44 @@ msgid "" "Alternatively, use an import preset that imports animations to separate " "files." msgstr "" +"×”×”× ×¤×©×” שייכת ×œ×¡×¦× ×” מיוב×ת, לכן ×©×™× ×•×™×™× ×œ×¨×¦×•×¢×•×ª המיוב×ות ×œ× ×™×©×ž×¨×•.\n" +"\n" +"להפעלת ×”×פשרות להוספת רצועות מות×מות-×ישית, יש לקבוע בהגדרות ×™×™×‘×•× ×©×œ ×”×¡×¦× ×” " +"×ת\n" +"\"×”× ×¤×©×” > ×חסון\" ל-\"קבצי×\", להפעיל ×ת \"×”× ×¤×©×” > הש×ר רצועות מות×מות-×ישית" +"\", ולבסוף ×œ×™×™×‘× ×ž×—×“×©.\n" +"דרך ×חרת, להשתמש בהגדרות ×™×™×‘×•× ×שר מייב××™× ×”× ×¤×©×•×ª ×œ×§×‘×¦×™× × ×¤×¨×“×™×." #: editor/animation_track_editor.cpp msgid "Warning: Editing imported animation" -msgstr "" +msgstr "×זהרה: עריכת ×”× ×¤×©×” מיוב×ת" #: editor/animation_track_editor.cpp msgid "Select an AnimationPlayer node to create and edit animations." -msgstr "" +msgstr "יש לבחור במפרק AnimationPlayer כדי ליצור ולערוך ×”× ×¤×©×•×ª." #: editor/animation_track_editor.cpp msgid "Only show tracks from nodes selected in tree." -msgstr "" +msgstr "הצגת רצועות רק של ×ž×¤×¨×§×™× ×©× ×‘×—×¨×• בעץ." #: editor/animation_track_editor.cpp msgid "Group tracks by node or display them as plain list." -msgstr "" +msgstr "קיבוץ רצועות לפי מפרק ×ו הצגה כרשימה פשוטה." #: editor/animation_track_editor.cpp -#, fuzzy msgid "Snap:" -msgstr "הצמדה" +msgstr "הצמדה:" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Animation step value." -msgstr "שקופיות ×”×”× ×¤×©×”" +msgstr "ערך צעד של ×”× ×¤×©×”." #: editor/animation_track_editor.cpp msgid "Seconds" -msgstr "" +msgstr "×©× ×™×•×ª" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -555,9 +559,8 @@ msgid "Animation properties." msgstr "מ××¤×™×™× ×™ ×”×”× ×¤×©×”." #: editor/animation_track_editor.cpp -#, fuzzy msgid "Copy Tracks" -msgstr "העתקת ×ž×©×ª× ×™×" +msgstr "העתקת רצועות" #: editor/animation_track_editor.cpp msgid "Scale Selection" @@ -722,7 +725,7 @@ msgstr "הת×מת רישיות" msgid "Whole Words" msgstr "×ž×™×œ×™× ×©×œ×ž×•×ª" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "החלף" @@ -918,6 +921,11 @@ msgid "Signals" msgstr "×ותות" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "מ××¤×™×™× ×™ פריט." + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -956,7 +964,7 @@ msgid "Recent:" msgstr "××—×¨×•× ×™×:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "חיפוש:" @@ -1644,21 +1652,21 @@ msgstr "" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "Import Dock" -msgstr "ייבו×" - -#: editor/editor_feature_profile.cpp -#, fuzzy msgid "Node Dock" msgstr "×©× ×”×ž×¤×¨×§:" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "FileSystem and Import Docks" +msgid "FileSystem Dock" msgstr "מערכת קבצי×" #: editor/editor_feature_profile.cpp #, fuzzy +msgid "Import Dock" +msgstr "ייבו×" + +#: editor/editor_feature_profile.cpp +#, fuzzy msgid "Erase profile '%s'? (no undo)" msgstr "להחליף הכול" @@ -1935,7 +1943,7 @@ msgstr "תיקיות וקבצי×:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "תצוגה מקדימה:" @@ -2794,24 +2802,28 @@ msgstr "הטעמה ×¢× × ×™×¤×•×™ שגי×ות מרחוק" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"בעת ×™×™×¦×•× ×ו הטמעה, קובץ ההפעלה ×™× ×¡×” להתחבר לכתובת ×”Ö¾IP של המחשב ×”×–×” לצורך " -"× ×™×¤×•×™ שגי×ות." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "הטמעה ×§×˜× ×” ×¢× ×ž×¢×¨×›×ª ×§×‘×¦×™× ×‘×¨×©×ª" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "×›×שר ×פשרות זו מופעלת, ×™×™×¦×•× ×ו פריסה יפיקו קובץ הפעלה ×ž×™× ×™×ž×œ×™.\n" "מערכת ×”×§×‘×¦×™× ×ª×¡×•×¤×§ ×ž×”×ž×™×–× ×¢×œ ידי העורך ברשת.\n" @@ -2823,9 +2835,10 @@ msgid "Visible Collision Shapes" msgstr "צורות ×”×ª× ×’×©×•×ª גלויי×" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "צורות ×”×ª× ×’×©×•×™×•×ª ומפרקי ×§×¨× ×™×™× (עבור דו ותלת מימד) יהיו ×’×œ×•×™×™× ×‘×”×¨×¦×ª המשחק ×× " "×פשרות ×–×ת מופעלת." @@ -2835,35 +2848,40 @@ msgid "Visible Navigation" msgstr "× ×™×•×•×˜ גלוי" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "רשתות × ×™×•×•×˜ ×•×ž×¦×•×œ×¢×™× ×™×”×™×• ×’×œ×•×™×™× ×‘×”×¨×¦×ª המשחק ×× ×פשרות ×–×ת מופעלת." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "×¡× ×›×¨×•×Ÿ ×”×©×™× ×•×™×™× ×‘×¡×¦× ×”" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "×›×שר ×פשרות זו מופעלת, כל ×”×©×™× ×•×™×™× ×©×™×‘×•×¦×¢×• ×‘×¡×¦× ×” בעורך יוצגו בהרצת המשחק.\n" "בשימוש ×¢× ×ž×›×©×™×¨ מרוחק, מערכת ×§×‘×¦×™× ×‘×¨×©×ª (NFS) תהיה יעילה יותר ." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "×¡× ×›×¨×•×Ÿ ×”×©×™× ×•×™×™× ×‘×¡×§×¨×™×¤×˜" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "×›×שר ×פשרות זו מופעלת, כל סקריפט ×©× ×©×ž×¨ יטען מחדש בהרצת המשחק.\n" "בשימוש ×¢× ×ž×›×©×™×¨ מרוחק, מערכת ×§×‘×¦×™× ×‘×¨×©×ª (NFS) תהיה יעילה יותר ." @@ -2925,7 +2943,7 @@ msgstr "עזרה" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "חיפוש" @@ -3338,7 +3356,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -5161,7 +5180,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7879,7 +7898,8 @@ msgid "New Animation" msgstr "×©× ×”× ×¤×©×” חדשה:" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "מהירות (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10407,11 +10427,16 @@ msgid "Batch Rename" msgstr "×©×™× ×•×™ ש×" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "להחליף " + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10462,7 +10487,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10524,8 +10549,9 @@ msgid "Reset" msgstr "×יפוס התקריב" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" -msgstr "" +#, fuzzy +msgid "Regular Expression Error:" +msgstr "גרסה × ×•×›×—×™×ª:" #: editor/rename_dialog.cpp #, fuzzy @@ -12339,12 +12365,14 @@ msgid "" "CPUParticles2D animation requires the usage of a CanvasItemMaterial with " "\"Particles Animation\" enabled." msgstr "" +"×”× ×¤×©×ª CPUParticles2D מחייבת שימוש ב-CanvasItemMaterial ×¢× \"×”× ×¤×©×ª חלקיקי×\" " +"מ×ופשרת." #: scene/2d/light_2d.cpp msgid "" "A texture with the shape of the light must be supplied to the \"Texture\" " "property." -msgstr "" +msgstr "יש לספק טקסטורה בצורת ×”×ור למ×פיין \"טקסטורה\"." #: scene/2d/light_occluder_2d.cpp msgid "" @@ -12360,12 +12388,16 @@ msgid "" "A NavigationPolygon resource must be set or created for this node to work. " "Please set a property or draw a polygon." msgstr "" +"יש להגדיר ×ו ליצור מש×ב NavigationPolygon כדי שמפרק ×–×” יעבוד. × × ×œ×§×‘×•×¢ " +"מ×פיין ×ו לצייר מצולע." #: scene/2d/navigation_polygon.cpp msgid "" "NavigationPolygonInstance must be a child or grandchild to a Navigation2D " "node. It only provides navigation data." msgstr "" +"NavigationPolygonInstance חייב להיות ילד ×ו × ×›×“ למפרק Navigation2D. ×”×•× ×ž×¡×¤×§ " +"רק × ×ª×•× ×™ × ×™×•×•×˜." #: scene/2d/parallax_layer.cpp msgid "" @@ -12379,6 +12411,9 @@ msgid "" "Use the CPUParticles2D node instead. You can use the \"Convert to " "CPUParticles\" option for this purpose." msgstr "" +"×—×œ×§×™×§×™× ×ž×‘×•×¡×¡×™ GPU ××™× × × ×ª×ž×›×™× ×¢×œ-ידי ×ž× ×”×œ וויד×ו GLES2.\n" +"השתמש בצומת CPUParticles2D במקו×. למטרה זו ×”×פשרות \"המר ×œ×—×œ×§×™×§×™× ×©×œ CPU\" " +"קיימת." #: scene/2d/particles_2d.cpp scene/3d/particles.cpp msgid "" @@ -12391,6 +12426,8 @@ msgid "" "Particles2D animation requires the usage of a CanvasItemMaterial with " "\"Particles Animation\" enabled." msgstr "" +"×”× ×¤×©×ª Particles2D מחייבת שימוש ב-CanvasItemMaterial ×¢× \"×”× ×¤×©×ª חלקיקי×\" " +"מ×ופשרת." #: scene/2d/path_2d.cpp msgid "PathFollow2D only works when set as a child of a Path2D node." @@ -12402,23 +12439,26 @@ msgid "" "by the physics engine when running.\n" "Change the size in children collision shapes instead." msgstr "" +"×©×™× ×•×™×™× ×‘×’×•×“×œ ל-RigidBody2D (במצבי character ×ו rigid) יבוטלו על ידי ×ž× ×•×¢ " +"הפיזיקה בזמן ריצה.\n" +"×‘×ž×§×•× ×–×ת יש ×œ×©× ×•×ª ×ת גודל צורות ×”×”×ª× ×’×©×•×ª של הצ×צ××™×." #: scene/2d/remote_transform_2d.cpp msgid "Path property must point to a valid Node2D node to work." -msgstr "" +msgstr "מ×פיין ×”× ×ª×™×‘ חייב להצביע על מפרק Node2D חוקי כדי לעבוד." #: scene/2d/skeleton_2d.cpp msgid "This Bone2D chain should end at a Skeleton2D node." -msgstr "" +msgstr "שרשרת Bone2D זו ×מורה ×œ×”×¡×ª×™×™× ×‘×ž×¤×¨×§ Skeleton2D." #: scene/2d/skeleton_2d.cpp msgid "A Bone2D only works with a Skeleton2D or another Bone2D as parent node." -msgstr "" +msgstr "Bone2D עובד רק ×¢× Skeleton2D ×ו Bone2D ×חר כמפרק ההורה." #: scene/2d/skeleton_2d.cpp msgid "" "This bone lacks a proper REST pose. Go to the Skeleton2D node and set one." -msgstr "" +msgstr "×œ×¢×¦× ×–×• ×ין ×ª× ×•×—×ª REST ר×ויה. עבור למפרק ×”-Skeleton2D והגדר ×חד." #: scene/2d/tile_map.cpp msgid "" @@ -12426,44 +12466,45 @@ msgid "" "to. Please use it as a child of Area2D, StaticBody2D, RigidBody2D, " "KinematicBody2D, etc. to give them a shape." msgstr "" +"TileMap ×¢× ×©×™×ž×•×© בהורה מ×ופשר זקוק להורה CollisionObject2D כדי לתת לו צורות. " +"×× × ×”×©×ª×ž×© בו כצ××¦× ×©×œ Area2D, StaticBody2D, RigidBody2D, KinematicBody2D " +"וכו' כדי לתת ×œ×”× ×¦×•×¨×”." #: scene/2d/visibility_notifier_2d.cpp msgid "" "VisibilityEnabler2D works best when used with the edited scene root directly " "as parent." msgstr "" +"VisibilityEnabler2D פועל בצורה הטובה ביותר בשימוש ×¢× ×”×ž×¤×¨×§ העליון ×‘×¡×¦×™× ×” " +"×©× ×¢×¨×›×” כהורה." #: scene/3d/arvr_nodes.cpp -#, fuzzy msgid "ARVRCamera must have an ARVROrigin node as its parent." -msgstr "ל־ARVRCamera חייב להיות מפרק ARVROrigin כהורה שלו" +msgstr "ההורה של ARVRCamera חייב להיות מפרק ARVROrigin." #: scene/3d/arvr_nodes.cpp -#, fuzzy msgid "ARVRController must have an ARVROrigin node as its parent." -msgstr "ל־ARVRCamera חייב להיות מפרק ARVROrigin כהורה שלו" +msgstr "ההורה של ARVRController חייב להיות מפרק ARVROrigin." #: scene/3d/arvr_nodes.cpp msgid "" "The controller ID must not be 0 or this controller won't be bound to an " "actual controller." -msgstr "" +msgstr "מזהה הבקר ××™× ×• יכול להיות 0 ×ו שבקר ×–×” ×œ× ×™×”×™×” מחובר לבקר ×”×מיתי." #: scene/3d/arvr_nodes.cpp -#, fuzzy msgid "ARVRAnchor must have an ARVROrigin node as its parent." -msgstr "ל־ARVRCamera חייב להיות מפרק ARVROrigin כהורה שלו" +msgstr "ההורה של ARVRAnchor חייב להיות מפרק ARVROrigin." #: scene/3d/arvr_nodes.cpp msgid "" "The anchor ID must not be 0 or this anchor won't be bound to an actual " "anchor." -msgstr "" +msgstr "מזהה העוגן ××™× ×• יכול להיות 0 ×ו שעוגן ×–×” ×œ× ×™×”×™×” מחובר לעוגן ×”×מיתי." #: scene/3d/arvr_nodes.cpp -#, fuzzy msgid "ARVROrigin requires an ARVRCamera child node." -msgstr "ARVROrigin דורש מפרק צ××¦× ×ž×¡×•×’ ARVRCamera" +msgstr "ARVROrigin דורש צ××¦× ×ž×¡×•×’ ARVRCamera." #: scene/3d/baked_lightmap.cpp msgid "%d%%" @@ -12475,19 +12516,19 @@ msgstr "(זמן ×©× ×•×ª×¨: %d:%02d ×©× ×³)" #: scene/3d/baked_lightmap.cpp msgid "Plotting Meshes: " -msgstr "" +msgstr "מדפיס רשתות: " #: scene/3d/baked_lightmap.cpp msgid "Plotting Lights:" -msgstr "" +msgstr "מדפיס ת×ורות:" #: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp msgid "Finishing Plot" -msgstr "" +msgstr "×ž×¡×™×™× ×”×“×¤×¡×”" #: scene/3d/baked_lightmap.cpp msgid "Lighting Meshes: " -msgstr "" +msgstr "רשתות ת×ורה: " #: scene/3d/collision_object.cpp msgid "" @@ -12495,6 +12536,9 @@ msgid "" "Consider adding a CollisionShape or CollisionPolygon as a child to define " "its shape." msgstr "" +"למפרק ×–×” ×ין צורה ולכן ×”×•× ×œ× ×™×›×•×œ ×œ×”×ª× ×’×© ×ו ×œ×§×™×™× ××™× ×˜×¨×קציה ×¢× ××•×‘×™×™×§×˜×™× " +"×חרי×.\n" +"כד××™ להוסיף CollisionShape2D ×ו CollisionPolygon2D כצ××¦× ×›×“×™ להגדיר צורה." #: scene/3d/collision_polygon.cpp msgid "" @@ -12502,6 +12546,9 @@ msgid "" "CollisionObject derived node. Please only use it as a child of Area, " "StaticBody, RigidBody, KinematicBody, etc. to give them a shape." msgstr "" +"CollisionPolygon2D משמש רק להספקת צורת ×”×ª× ×’×©×•×ª למפרק היורש מ-" +"CollisionObject2D. השימוש בו ×”×•× ×¨×§ כצ××¦× ×©×œ Area2D, StaticBody2D, " +"RigidBody2D, KinematicBody2D וכו'." #: scene/3d/collision_polygon.cpp msgid "An empty CollisionPolygon has no effect on collision." @@ -12513,57 +12560,71 @@ msgid "" "derived node. Please only use it as a child of Area, StaticBody, RigidBody, " "KinematicBody, etc. to give them a shape." msgstr "" +"CollisionShape משמש רק להספקת צורת ×”×ª× ×’×©×•×ª למפרק היורש מ-CollisionObject2D. " +"השימוש בו ×”×•× ×¨×§ כצ××¦× ×©×œ Area, StaticBody, RigidBody, KinematicBody וכו'." #: scene/3d/collision_shape.cpp msgid "" "A shape must be provided for CollisionShape to function. Please create a " "shape resource for it." -msgstr "" +msgstr "יש לספק צורה כדי ש-CollisionShape יתפקד. יש ליצור מש×ב צורה עבורו." #: scene/3d/collision_shape.cpp msgid "" "Plane shapes don't work well and will be removed in future versions. Please " "don't use them." msgstr "" +"צורות מישוריות ××™× ×Ÿ פועלות היטב ויוסרו בגירס×ות עתידיות. × × ×œ× ×œ×”×©×ª×ž×© בהן." #: scene/3d/collision_shape.cpp msgid "" "ConcavePolygonShape doesn't support RigidBody in another mode than static." -msgstr "" +msgstr "ConcavePolygonShape ×œ× ×ª×•×ž×š ב- RigidBody במצב ש××™× ×• סטטי." #: scene/3d/cpu_particles.cpp msgid "Nothing is visible because no mesh has been assigned." -msgstr "" +msgstr "×©×•× ×“×‘×¨ ×œ× × ×¨××” ×›×™ ×œ× ×”×•×§×¦××” רשת." #: scene/3d/cpu_particles.cpp msgid "" "CPUParticles animation requires the usage of a SpatialMaterial whose " "Billboard Mode is set to \"Particle Billboard\"." msgstr "" +"×× ×™×ž×¦×™×” של CPUParticles מחייבת שימוש ב-SpatialMaterial ×שר מצב Billboard שלו " +"מוגדר ל-\"Particle Billboard\"." #: scene/3d/gi_probe.cpp msgid "Plotting Meshes" -msgstr "" +msgstr "הדפסת רשתות" #: scene/3d/gi_probe.cpp msgid "" "GIProbes are not supported by the GLES2 video driver.\n" "Use a BakedLightmap instead." msgstr "" +"×ž× ×”×œ הוויד×ו GLES2 ××™× ×• תומך ב- GIProbes.\n" +"השתמש ב-BakedLightmap במקו×." + +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." -msgstr "" +msgstr "SpotLight ×¢× ×–×•×•×™×ª רחבה מ-90 מעלות ××™× ×• יכול להטיל צללי×." #: scene/3d/navigation_mesh.cpp msgid "A NavigationMesh resource must be set or created for this node to work." -msgstr "" +msgstr "יש להגדיר ×ו ליצור מש×ב NavigationMesh כדי שצומת ×–×” יפעל." #: scene/3d/navigation_mesh.cpp msgid "" "NavigationMeshInstance must be a child or grandchild to a Navigation node. " "It only provides navigation data." msgstr "" +"NavigationMeshInstance חייב להיות ילד ×ו × ×›×“ למפרק Navigation. ×”×•× ×ž×¡×¤×§ רק " +"× ×ª×•× ×™ × ×™×•×•×˜." #: scene/3d/particles.cpp msgid "" @@ -12571,28 +12632,34 @@ msgid "" "Use the CPUParticles node instead. You can use the \"Convert to CPUParticles" "\" option for this purpose." msgstr "" +"×—×œ×§×™×§×™× ×ž×‘×•×¡×¡×™ GPU ××™× × × ×ª×ž×›×™× ×¢×œ-ידי ×ž× ×”×œ וויד×ו GLES2.\n" +"השתמש בצומת CPUParticles במקו×. למטרה זו ×”×פשרות \"המר ×œ×—×œ×§×™×§×™× ×©×œ CPU\" " +"קיימת." #: scene/3d/particles.cpp msgid "" "Nothing is visible because meshes have not been assigned to draw passes." -msgstr "" +msgstr "×©×•× ×“×‘×¨ ××™× ×• גלוי ×›×™ רשתות ×œ× ×”×•×§×¦×• למעברי ההדפסה." #: scene/3d/particles.cpp msgid "" "Particles animation requires the usage of a SpatialMaterial whose Billboard " "Mode is set to \"Particle Billboard\"." msgstr "" +"×× ×™×ž×¦×™×” של ×—×œ×§×™×§×™× ×ž×—×™×™×‘×ª שימוש ב-SpatialMaterial ×שר מצב Billboard שלו " +"מוגדר ל-\"Particle Billboard\"." #: scene/3d/path.cpp -#, fuzzy msgid "PathFollow only works when set as a child of a Path node." -msgstr "PathFollow2D עובד רק ×›×שר ×”×•× ×ž×•×’×“×¨ כצ××¦× ×©×œ מפרק Path2D." +msgstr "PathFollow עובד רק ×›×שר ×”×•× ×ž×•×’×“×¨ כצ××¦× ×©×œ מפרק Path." #: scene/3d/path.cpp msgid "" "PathFollow's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its " "parent Path's Curve resource." msgstr "" +"ROTATION_ORIENTED של PathFollow דורש הפעלה של \"Up Vector\" במש×ב העקומה של " +"Path בהורה שלו." #: scene/3d/physics_body.cpp msgid "" @@ -12600,16 +12667,21 @@ msgid "" "by the physics engine when running.\n" "Change the size in children collision shapes instead." msgstr "" +"×©×™× ×•×™×™× ×‘×’×•×“×œ ל-RigidBody (במצבי character ×ו rigid) יבוטלו על ידי ×ž× ×•×¢ " +"הפיזיקה בזמן ריצה.\n" +"×‘×ž×§×•× ×–×ת יש ×œ×©× ×•×ª ×ת גודל צורות ×”×”×ª× ×’×©×•×ª של הצ×צ××™×." #: scene/3d/remote_transform.cpp msgid "" "The \"Remote Path\" property must point to a valid Spatial or Spatial-" "derived node to work." msgstr "" +"המ×פיין \"Remote Path\" חייב ×œ×”×¤× ×•×ª למפרק חוקי מסוג Spatial ×ו יורש ×ž×ž× ×• כדי " +"לעבוד." #: scene/3d/soft_body.cpp msgid "This body will be ignored until you set a mesh." -msgstr "" +msgstr "תהיה התעלמות מגוף ×–×” עד שתקבע רשת." #: scene/3d/soft_body.cpp msgid "" @@ -12617,77 +12689,85 @@ msgid "" "running.\n" "Change the size in children collision shapes instead." msgstr "" +"×©×™× ×•×™×™× ×‘×’×•×“×œ ל-SoftBody יבוטלו על ידי ×ž× ×•×¢ הפיזיקה בזמן ריצה.\n" +"×‘×ž×§×•× ×–×ת יש ×œ×©× ×•×ª ×ת גודל צורות ×”×”×ª× ×’×©×•×ª של הצ×צ××™×." #: scene/3d/sprite_3d.cpp msgid "" "A SpriteFrames resource must be created or set in the \"Frames\" property in " "order for AnimatedSprite3D to display frames." msgstr "" +"יש ליצור ×ו להגדיר מש×ב SpriteFrames במ×פיין \"Frames\" כדי ש-" +"AnimatedSprite3D יציג ×ª×ž×•× ×™×•×ª." #: scene/3d/vehicle_body.cpp msgid "" "VehicleWheel serves to provide a wheel system to a VehicleBody. Please use " "it as a child of a VehicleBody." msgstr "" +"VehicleWheel משמש להספקת מערכת ×’×œ×’×œ×™× ×œ-VehicleBody. יש להשתמש בו כצ××¦× ×©×œ " +"VehicleBody." #: scene/3d/world_environment.cpp msgid "" "WorldEnvironment requires its \"Environment\" property to contain an " "Environment to have a visible effect." msgstr "" +"WorldEnvironment דורש שמ×פיין \"Environment\" שלו יכיל סביבה כדי שתהיה השפעה " +"גלויה." #: scene/3d/world_environment.cpp msgid "" "Only one WorldEnvironment is allowed per scene (or set of instanced scenes)." -msgstr "" +msgstr "רק WorldEnvironment ×חד מותר לכל ×¡×¦× ×” (×ו קבוצה של מופעי ×¡×¦× ×•×ª)." #: scene/3d/world_environment.cpp msgid "" "This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set " "this environment's Background Mode to Canvas (for 2D scenes)." msgstr "" +"×”-WorldEnvironment ×”×–×” ×œ× ×¤×¢×™×œ. הוסף מצלמה (×œ×¡×¦× ×•×ª תלת ממדיות) ×ו הגדר ×ת " +"מצב הרקע של סביבה זו ל-Canvas (×œ×¡×¦×™× ×•×ª דו-ממדיות)." #: scene/animation/animation_blend_tree.cpp msgid "On BlendTree node '%s', animation not found: '%s'" -msgstr "" +msgstr "במפרק 'BlendTree '%s, ×”× ×¤×©×” ×œ× × ×ž×¦××”: '%s'" #: scene/animation/animation_blend_tree.cpp -#, fuzzy msgid "Animation not found: '%s'" -msgstr "משך ×”×”× ×¤×©×” (×‘×©× ×™×•×ª)." +msgstr "×”× ×¤×©×” ×œ× × ×ž×¦××”: '%s'" #: scene/animation/animation_tree.cpp msgid "In node '%s', invalid animation: '%s'." -msgstr "" +msgstr "בצומת '%s', ×”× ×¤×©×” ×œ× ×—×•×§×™×ª: '%s'." #: scene/animation/animation_tree.cpp -#, fuzzy msgid "Invalid animation: '%s'." -msgstr "גודל הגופן שגוי." +msgstr "×”× ×¤×©×” ×œ× ×—×•×§×™×ª: '%s'." #: scene/animation/animation_tree.cpp msgid "Nothing connected to input '%s' of node '%s'." -msgstr "" +msgstr "×©×•× ×“×‘×¨ ×œ× ×ž×—×•×‘×¨ לקלט '%s' של צומת '%s'." #: scene/animation/animation_tree.cpp msgid "No root AnimationNode for the graph is set." -msgstr "" +msgstr "×œ× × ×§×‘×¢ שורש AnimationNode עבור הגרף." #: scene/animation/animation_tree.cpp msgid "Path to an AnimationPlayer node containing animations is not set." -msgstr "" +msgstr "×œ× × ×§×‘×¢ × ×ª×™×‘ למפרק AnimationPlayer המכיל ×”× ×¤×©×•×ª." #: scene/animation/animation_tree.cpp msgid "Path set for AnimationPlayer does not lead to an AnimationPlayer node." -msgstr "" +msgstr "×”× ×ª×™×‘ שהוגדר ל-AnimationPlayer ××™× ×• מוביל למפרק AnimationPlayer." #: scene/animation/animation_tree.cpp msgid "The AnimationPlayer root node is not a valid node." -msgstr "" +msgstr "המפרק AnimationPlayer העליון ××™× ×• צומת חוקי." #: scene/animation/animation_tree_player.cpp msgid "This node has been deprecated. Use AnimationTree instead." -msgstr "" +msgstr "מפרק ×–×” ×”×•×¦× ×ž×©×™×ž×•×©. יש להשתמש ב-AnimationTree במקו×." #: scene/gui/color_picker.cpp msgid "" @@ -12695,27 +12775,29 @@ msgid "" "LMB: Set color\n" "RMB: Remove preset" msgstr "" +"צבע: #%s\n" +"לחצן עכבר שמ×לי: קביעת צבע\n" +"לחצן עכבר ×™×ž× ×™: הסרת צבע שמור" #: scene/gui/color_picker.cpp msgid "Pick a color from the editor window." -msgstr "" +msgstr "בחירת צבע מחלון העורך." #: scene/gui/color_picker.cpp msgid "HSV" -msgstr "" +msgstr "HSV" #: scene/gui/color_picker.cpp msgid "Raw" -msgstr "" +msgstr "Raw" #: scene/gui/color_picker.cpp msgid "Switch between hexadecimal and code values." -msgstr "" +msgstr "מעבר בין ×¢×¨×›×™× ×”×§×¡×“×¦×™×ž×œ×™× ×œ×¢×¨×›×™ קוד." #: scene/gui/color_picker.cpp -#, fuzzy msgid "Add current color as a preset." -msgstr "הוספת הצבע ×”× ×•×›×—×™ כערכה" +msgstr "הוספת הצבע ×”× ×•×›×—×™ לערכת הצבעי×." #: scene/gui/container.cpp msgid "" @@ -12723,20 +12805,24 @@ msgid "" "children placement behavior.\n" "If you don't intend to add a script, use a plain Control node instead." msgstr "" +"המיכל ×‘×¤× ×™ עצמו ××™× ×• משרת מטרה ××œ× ×× ×›×Ÿ סקריפט מגדיר ×ת ×”×ž×™×§×•× ×©×œ צ×צ×יו.\n" +"×× ×ין ×›×•×•× ×” להוסיף סקריפט, יש להוסיף ×‘×ž×§×•× ×–×ת מפרק בקרה פשוט." #: scene/gui/control.cpp msgid "" "The Hint Tooltip won't be displayed as the control's Mouse Filter is set to " "\"Ignore\". To solve this, set the Mouse Filter to \"Stop\" or \"Pass\"." msgstr "" +"×”-Hint Tooltip ×œ× ×™×•×¦×’ ×›×שר ×ž×¡× ×Ÿ העכבר של הבקר × ×§×‘×¢ ×›-\"Ignore\". כדי לפתור " +"×–×ת, יש להגדיר ×ת ×ž×¡× ×Ÿ העכבר ל-\"Stop\" ×ו \"Pass\"." #: scene/gui/dialogs.cpp msgid "Alert!" -msgstr "" +msgstr "×זהרה!" #: scene/gui/dialogs.cpp msgid "Please Confirm..." -msgstr "× × ×œ×מת…" +msgstr "× × ×œ×שר…" #: scene/gui/popup.cpp msgid "" @@ -12744,10 +12830,12 @@ msgid "" "functions. Making them visible for editing is fine, but they will hide upon " "running." msgstr "" +"×—×œ×•× ×•×ª ×§×•×¤×¦×™× ×ž×•×¡×ª×¨×™× ×›×‘×¨×™×¨×ª מחדל ××œ× ×× ×ª×”×™×” קרי××” ל-popup() ×ו ל×חת " +"×ž×¤×•× ×§×¦×™×•×ª popup*(). ×”×—×œ×•× ×•×ª יוצגו בזמן עריכה, ×ך יוסתרו בזמן ריצה." #: scene/gui/range.cpp msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0." -msgstr "" +msgstr "×× \"Exp Edit\" מ×ופשר, \"Min Value\" חייב להיות גדול מ-0." #: scene/gui/scroll_container.cpp msgid "" @@ -12755,6 +12843,9 @@ msgid "" "Use a container as child (VBox, HBox, etc.), or a Control and set the custom " "minimum size manually." msgstr "" +"ScrollContainer מיועד לעבודה ×¢× ×‘×§×¨ צ××¦× ×™×—×™×“.\n" +"יש להשתמש במיכל כצ××¦× (VBox, HBox וכו'), ×ו בבקר ולקבוע ×ת הגודל ×”×ž×™× ×™×ž×œ×™ " +"המות×× ×ישית ב×ופן ×™×“× ×™." #: scene/gui/tree.cpp msgid "(Other)" @@ -12765,6 +12856,8 @@ msgid "" "Default Environment as specified in Project Settings (Rendering -> " "Environment -> Default Environment) could not be loaded." msgstr "" +"×œ× ×”×™×ª×” ×פשרות לטעון ×ת הסביבה ×©× ×§×‘×¢×” כברירת המחדל בהגדרות ×”×ž×™×–× (Rendering -" +"> Environment -> Default Environment)." #: scene/main/viewport.cpp msgid "" @@ -12773,41 +12866,52 @@ msgid "" "obtain a size. Otherwise, make it a RenderTarget and assign its internal " "texture to some node for display." msgstr "" +"חלון תצוגה ×–×” ××™× ×• מוגדר כיעד עיבוד. להצגת התוכן ישירות למסך, יש להפוך ×ותו " +"לצ××¦× ×©×œ בקר כדי שיקבל גודל. ×ו להפוך ×ותו ל-RenderTarget ולשייך ×ת ×”×ž×¨×§× " +"×”×¤× ×™×ž×™ שלו למפרק כלשהו לתצוגה." #: scene/main/viewport.cpp msgid "Viewport size must be greater than 0 to render anything." -msgstr "" +msgstr "גודל חלון התצוגה חייב להיות גדול מ-0 על ×ž× ×ª להציג משהו." #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid source for preview." -msgstr "גודל הגופן שגוי." +msgstr "מקור ×œ× ×ª×§×™×Ÿ לתצוגה מקדימה." #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid source for shader." -msgstr "גודל הגופן שגוי." +msgstr "מקור ×œ× ×ª×§×™×Ÿ ל-shader." #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid comparison function for that type." -msgstr "גודל הגופן שגוי." +msgstr "×¤×•× ×§×¦×™×™×ª השוו××” ×œ× ×—×•×§×™×ª לסוג ×–×”." #: servers/visual/shader_language.cpp msgid "Assignment to function." -msgstr "" +msgstr "השמה ×œ×¤×•× ×§×¦×™×”." #: servers/visual/shader_language.cpp msgid "Assignment to uniform." -msgstr "" +msgstr "השמה ל-uniform." #: servers/visual/shader_language.cpp msgid "Varyings can only be assigned in vertex function." -msgstr "" +msgstr "× ×™×ª×Ÿ להקצות ×©×™× ×•×™×™× ×¨×§ ×‘×¤×•× ×§×¦×™×ª vertex." #: servers/visual/shader_language.cpp msgid "Constants cannot be modified." -msgstr "" +msgstr "××™ ×פשר ×œ×©× ×•×ª קבועי×." + +#, fuzzy +#~ msgid "FileSystem and Import Docks" +#~ msgstr "מערכת קבצי×" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "בעת ×™×™×¦×•× ×ו הטמעה, קובץ ההפעלה ×™× ×¡×” להתחבר לכתובת ×”Ö¾IP של המחשב ×”×–×” " +#~ "לצורך × ×™×¤×•×™ שגי×ות." #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "×”×¡×¦× ×” ×”× ×•×›×—×™×ª ×ž×¢×•×œ× ×œ× × ×©×ž×¨×”, × × ×œ×©×ž×•×¨ ×ותה ×‘×˜×¨× ×”×”×¨×¦×”." diff --git a/editor/translations/hi.po b/editor/translations/hi.po index 0704292af5..3c8f54033a 100644 --- a/editor/translations/hi.po +++ b/editor/translations/hi.po @@ -528,6 +528,7 @@ msgid "Seconds" msgstr "सेकंड" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "à¤à¤«à¤ªà¥€à¤à¤¸" @@ -706,7 +707,7 @@ msgstr "पूंजीकरण मेल करे" msgid "Whole Words" msgstr "पूरे शबà¥à¤¦" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "बदले" @@ -898,6 +899,11 @@ msgid "Signals" msgstr "संकेत" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "फ़िलà¥à¤Ÿà¤° फ़ाइलें..." + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "कà¥à¤¯à¤¾ आप सà¥à¤¨à¤¿à¤¶à¥à¤šà¤¿à¤¤ हैं कि आप इस सिगà¥à¤¨à¤² से सà¤à¥€ कनेकà¥à¤¶à¤¨ हटाना चाहते हैं?" @@ -935,7 +941,7 @@ msgid "Recent:" msgstr "हाल ही में किया:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "खोज:" @@ -1622,16 +1628,17 @@ msgid "Scene Tree Editing" msgstr "सीन टà¥à¤°à¥€ à¤à¤¡à¤¿à¤Ÿà¤¿à¤‚ग" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "इंपोरà¥à¤Ÿ डॉक" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "नोड डॉक" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "फाइलसिसà¥à¤Ÿà¥‡à¤® और इंपोरà¥à¤Ÿ डोकà¥à¤¸" +#, fuzzy +msgid "FileSystem Dock" +msgstr "फ़ाइल" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "इंपोरà¥à¤Ÿ डॉक" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1893,7 +1900,7 @@ msgstr "डायरेकà¥à¤Ÿà¤°à¤¿à¤œ & फ़ाइले:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "पूरà¥à¤µ दरà¥à¤¶à¤¨:" @@ -2754,24 +2761,28 @@ msgstr "रिमोट डिबग के साथ तैनात" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"निरà¥à¤¯à¤¾à¤¤ या तैनाती करते समय, परिणामी निषà¥à¤ªà¤¾à¤¦à¤• इस कंपà¥à¤¯à¥‚टर के आईपी से जà¥à¤¡à¤¼à¤¨à¥‡ का पà¥à¤°à¤¯à¤¾à¤¸ करेगा " -"ताकि डिबग किया जा सके।" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "नेटवरà¥à¤• à¤à¤«à¤à¤¸ के साथ छोटे तैनात" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "जब यह विकलà¥à¤ª सकà¥à¤·à¤® हो जाता है, तो निरà¥à¤¯à¤¾à¤¤ या तैनाती नà¥à¤¯à¥‚नतम निषà¥à¤ªà¤¾à¤¦à¤¿à¤¤ उतà¥à¤ªà¤¾à¤¦à¤¨ करेगी।\n" "नेटवरà¥à¤• के ऊपर संपादक दà¥à¤µà¤¾à¤°à¤¾ परियोजना से फाइलसिसà¥à¤Ÿà¤® उपलबà¥à¤§ कराया जाà¤à¤—ा।\n" @@ -2783,9 +2794,10 @@ msgid "Visible Collision Shapes" msgstr "दृशà¥à¤¯à¤®à¤¾à¤¨ टकराव आकार" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "यदि यह विकलà¥à¤ª चालू हो जाता है तो टकराव के आकार और रेकासà¥à¤Ÿ नोडà¥à¤¸ (2डी और 3 डी के लिà¤) " "चल रहे खेल पर दिखाई देंगे।" @@ -2795,21 +2807,24 @@ msgid "Visible Navigation" msgstr "दरà¥à¤¶à¤¨à¥€à¤¯ नेविगेशन" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "यदि यह विकलà¥à¤ª चालू हो जाता है तो नेविगेशन मेशेस और बहà¥à¤à¥à¤œ चल रहे खेल पर दिखाई देंगे।" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "सिंक सीन बदलता है" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "जब इस विकलà¥à¤ª को चालू किया जाता है, तो संपादक में दृशà¥à¤¯ में किठगठकिसी à¤à¥€ परिवरà¥à¤¤à¤¨ को " "चल रहे खेल में दोहराया जाà¤à¤—ा।\n" @@ -2817,15 +2832,17 @@ msgstr "" "कà¥à¤¶à¤² होता है।" #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "सिंक सà¥à¤•à¥à¤°à¤¿à¤ªà¥à¤Ÿ परिवरà¥à¤¤à¤¨" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "जब यह विकलà¥à¤ª चालू हो जाà¤à¤—ा, तो सहेजी गई किसी à¤à¥€ सà¥à¤•à¥à¤°à¤¿à¤ªà¥à¤Ÿ को चल रहे गेम पर फिर से लोड " "किया जाà¤à¤—ा।\n" @@ -2889,7 +2906,7 @@ msgstr "मदद" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "ढूंढें" @@ -3302,9 +3319,11 @@ msgid "Add Key/Value Pair" msgstr "कà¥à¤‚जी/मूलà¥à¤¯ जोड़ी जोड़ें" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "इस मंच के लिठकोई रननयोगà¥à¤¯ निरà¥à¤¯à¤¾à¤¤ पूरà¥à¤µ निरà¥à¤§à¤¾à¤°à¤¿à¤¤ नहीं मिला।\n" "कृपया निरà¥à¤¯à¤¾à¤¤ मेनू में à¤à¤• रननेबल पà¥à¤°à¥€à¤¸à¥‡à¤Ÿ जोड़ें।" @@ -5035,7 +5054,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7655,7 +7674,7 @@ msgid "New Animation" msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ लूप" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10122,11 +10141,16 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "बदले" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10172,7 +10196,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10231,7 +10255,7 @@ msgid "Reset" msgstr "रीसेट आकार" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -12208,6 +12232,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12464,6 +12493,16 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "FileSystem and Import Docks" +#~ msgstr "फाइलसिसà¥à¤Ÿà¥‡à¤® और इंपोरà¥à¤Ÿ डोकà¥à¤¸" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "निरà¥à¤¯à¤¾à¤¤ या तैनाती करते समय, परिणामी निषà¥à¤ªà¤¾à¤¦à¤• इस कंपà¥à¤¯à¥‚टर के आईपी से जà¥à¤¡à¤¼à¤¨à¥‡ का पà¥à¤°à¤¯à¤¾à¤¸ " +#~ "करेगा ताकि डिबग किया जा सके।" + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "वरà¥à¤¤à¤®à¤¾à¤¨ दृशà¥à¤¯ कà¤à¥€ नहीं बचाया गया था, कृपया इसे चलाने से पहले बचाने के लिठ।" diff --git a/editor/translations/hr.po b/editor/translations/hr.po index e4ea6d0a1a..ff82f3aafc 100644 --- a/editor/translations/hr.po +++ b/editor/translations/hr.po @@ -512,6 +512,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -691,7 +692,7 @@ msgstr "" msgid "Whole Words" msgstr "Cijele rijeÄi" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Zamijeni" @@ -884,6 +885,11 @@ msgid "Signals" msgstr "Signali" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Iz signala:" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Jesi li siguran da želiÅ¡ ukloniti sve veze s ovog signala?" @@ -921,7 +927,7 @@ msgid "Recent:" msgstr "Nedavno:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Pretraga:" @@ -1600,15 +1606,15 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" +msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Node Dock" +msgid "FileSystem Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1871,7 +1877,7 @@ msgstr "Direktoriji i datoteke:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Pregled:" @@ -2700,22 +2706,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2724,8 +2734,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2734,32 +2744,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2819,7 +2829,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3222,7 +3232,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -4954,7 +4965,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7549,7 +7560,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -9973,11 +9984,16 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Zamijeni" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10023,7 +10039,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10081,7 +10097,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -12031,6 +12047,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/hu.po b/editor/translations/hu.po index 59a6e0ad25..cac984d6d6 100644 --- a/editor/translations/hu.po +++ b/editor/translations/hu.po @@ -16,8 +16,8 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-09-05 09:37+0000\n" -"Last-Translator: cefrebevalo <szmarci711@gmail.com>\n" +"PO-Revision-Date: 2020-09-22 03:23+0000\n" +"Last-Translator: Ãcs Zoltán <acszoltan111@gmail.com>\n" "Language-Team: Hungarian <https://hosted.weblate.org/projects/godot-engine/" "godot/hu/>\n" "Language: hu\n" @@ -31,11 +31,12 @@ msgstr "" #: modules/visual_script/visual_script_builtin_funcs.cpp msgid "Invalid type argument to convert(), use TYPE_* constants." msgstr "" -"Érvénytelen tÃpus argumentum a convert()-hez használjon TYPE_* konstansokat." +"Érvénytelen tÃpusargumentum a convert()-hez használjon TYPE_* konstansokat." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp +#, fuzzy msgid "Expected a string of length 1 (a character)." -msgstr "A várt string egy karakter hosszú." +msgstr "Egy hosszúságú karaktersorozat szükséges." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/mono/glue/gd_glue.cpp @@ -57,7 +58,7 @@ msgstr "Érvénytelen operandusok az %s, %s és %s operátorhoz." #: core/math/expression.cpp msgid "Invalid index of type %s for base type %s" -msgstr "Érvénytelen %s tÃpusú index a %s alap tÃpushoz." +msgstr "" #: core/math/expression.cpp msgid "Invalid named index '%s' for base type %s" @@ -121,15 +122,15 @@ msgstr "Érték:" #: editor/animation_bezier_editor.cpp msgid "Insert Key Here" -msgstr "Kulcs Beszúrása" +msgstr "Kulcs beszúrása" #: editor/animation_bezier_editor.cpp msgid "Duplicate Selected Key(s)" -msgstr "Kiválasztott elem(ek) megkettÅ‘zése" +msgstr "Kiválasztott kulcs(ok) megkettÅ‘zése" #: editor/animation_bezier_editor.cpp msgid "Delete Selected Key(s)" -msgstr "Kiválasztott kulcsok törlése" +msgstr "Kiválasztott kulcs(ok) törlése" #: editor/animation_bezier_editor.cpp msgid "Add Bezier Point" @@ -137,7 +138,7 @@ msgstr "Bézier pont hozzáadása" #: editor/animation_bezier_editor.cpp msgid "Move Bezier Points" -msgstr "Bézier pont mozgatása" +msgstr "Bézier pontok áthelyezése" #: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp msgid "Anim Duplicate Keys" @@ -145,9 +146,10 @@ msgstr "Animáció kulcsok megkettÅ‘zése" #: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp msgid "Anim Delete Keys" -msgstr "Animáció kulcs törlése" +msgstr "Animáció kulcsok törlése" #: editor/animation_track_editor.cpp +#, fuzzy msgid "Anim Change Keyframe Time" msgstr "Animáció kulcsképkocka idÅ‘ változtatás" @@ -194,7 +196,7 @@ msgstr "Animáció hÃvás változtatás" #: editor/animation_track_editor.cpp msgid "Change Animation Length" -msgstr "Animáció hosszának megváltoztatása" +msgstr "Animáció hosszának változtatása" #: editor/animation_track_editor.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -215,9 +217,10 @@ msgstr "HÃvás módszer követése" #: editor/animation_track_editor.cpp msgid "Bezier Curve Track" -msgstr "Bezier Görbe Nyomvonal" +msgstr "Bézier görbe nyomvonal" #: editor/animation_track_editor.cpp +#, fuzzy msgid "Audio Playback Track" msgstr "Hang lejátszás követése" @@ -239,26 +242,28 @@ msgstr "Nyomvonal hozzáadása" #: editor/animation_track_editor.cpp msgid "Animation Looping" -msgstr "Animáció ismételtetése" +msgstr "Animáció ismétlése" #: editor/animation_track_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Functions:" -msgstr "Funkciók:" +msgstr "Függvények:" #: editor/animation_track_editor.cpp +#, fuzzy msgid "Audio Clips:" -msgstr "" +msgstr "Audió klipek:" #: editor/animation_track_editor.cpp msgid "Anim Clips:" -msgstr "" +msgstr "Animáció klipek:" #: editor/animation_track_editor.cpp msgid "Change Track Path" msgstr "" #: editor/animation_track_editor.cpp +#, fuzzy msgid "Toggle this track on/off." msgstr "A sáv ki/be kapcsolása." @@ -268,7 +273,7 @@ msgstr "" #: editor/animation_track_editor.cpp msgid "Interpolation Mode" -msgstr "Interpoláció mód" +msgstr "Interpolációs mód" #: editor/animation_track_editor.cpp msgid "Loop Wrap Mode (Interpolate end with beginning on loop)" @@ -281,12 +286,11 @@ msgstr "Kiválasztott nyomvonal eltávolÃtása." #: editor/animation_track_editor.cpp msgid "Time (s): " -msgstr "IdÅ‘ (mp):" +msgstr "IdÅ‘ (mp): " #: editor/animation_track_editor.cpp -#, fuzzy msgid "Toggle Track Enabled" -msgstr "Doppler engedélyezése" +msgstr "" #: editor/animation_track_editor.cpp msgid "Continuous" @@ -328,32 +332,27 @@ msgstr "" #: editor/animation_track_editor.cpp #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Insert Key" -msgstr "Kulcs Beszúrása" +msgstr "Kulcs beszúrása" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Duplicate Key(s)" -msgstr "Animáció kulcsok megkettÅ‘zése" +msgstr "Kulcs(ok) megkettÅ‘zése" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Delete Key(s)" -msgstr "Animáció kulcs törlés" +msgstr "Kulcs(ok) törlése" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Update Mode" -msgstr "Animáció Nevének Megváltoztatása:" +msgstr "Animáció frissÃtés módjának megváltoztatása" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Interpolation Mode" -msgstr "Animáció Node" +msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Change Animation Loop Mode" -msgstr "Animáció hurok változtatás" +msgstr "Animáció hurok mód változtatása" #: editor/animation_track_editor.cpp msgid "Remove Anim Track" @@ -361,11 +360,11 @@ msgstr "Animáció nyomvonal eltávolÃtás" #: editor/animation_track_editor.cpp msgid "Create NEW track for %s and insert key?" -msgstr "Létrehoz ÚJ nyomvonalat %s -hez és beilleszti a kulcsot?" +msgstr "ÚJ nyomvonalat hoz létre a következÅ‘höz: %s, és beszúrja a kulcsot?" #: editor/animation_track_editor.cpp msgid "Create %d NEW tracks and insert keys?" -msgstr "Létrehoz %d ÚJ nyomvonalat és beilleszti a kulcsokat?" +msgstr "Létrehoz %d ÚJ nyomvonalat és beszúrja a kulcsokat?" #: editor/animation_track_editor.cpp editor/create_dialog.cpp #: editor/editor_audio_buses.cpp editor/editor_feature_profile.cpp @@ -381,19 +380,20 @@ msgstr "Létrehozás" #: editor/animation_track_editor.cpp msgid "Anim Insert" -msgstr "Animáció beillesztés" +msgstr "Animáció beszúrása" #: editor/animation_track_editor.cpp +#, fuzzy msgid "AnimationPlayer can't animate itself, only other players." -msgstr "" +msgstr "Az AnimationPlayer nem tudja animálni önmagát, csak más játékosokat." #: editor/animation_track_editor.cpp msgid "Anim Create & Insert" -msgstr "Animáció létrehozás és beillesztés" +msgstr "Animáció létrehozása és beillesztése" #: editor/animation_track_editor.cpp msgid "Anim Insert Track & Key" -msgstr "Animáció nyomvonal és kulcs beillesztés" +msgstr "Animáció nyomvonal és kulcs beszúrása" #: editor/animation_track_editor.cpp msgid "Anim Insert Key" @@ -404,9 +404,8 @@ msgid "Change Animation Step" msgstr "Animáció léptékének megváltoztatása" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Rearrange Tracks" -msgstr "AutoLoad-ok Ãtrendezése" +msgstr "" #: editor/animation_track_editor.cpp msgid "Transform tracks only apply to Spatial-based nodes." @@ -437,9 +436,8 @@ msgid "Invalid track for Bezier (no suitable sub-properties)" msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Bezier Track" -msgstr "Animáció nyomvonal hozzáadás" +msgstr "" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a key." @@ -450,43 +448,40 @@ msgid "Track is not of type Spatial, can't insert key" msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Transform Track Key" -msgstr "UV Térkép Transzformálása" +msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Track Key" -msgstr "Animáció nyomvonal hozzáadás" +msgstr "Nyomvonal kulcs hozzáadása" #: editor/animation_track_editor.cpp msgid "Track path is invalid, so can't add a method key." msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add Method Track Key" -msgstr "Animáció nyomvonal és kulcs beillesztés" +msgstr "Metódus nyomvonal kulcs beillesztése" #: editor/animation_track_editor.cpp msgid "Method not found in object: " -msgstr "" +msgstr "A metódus nem található az objektumban: " #: editor/animation_track_editor.cpp +#, fuzzy msgid "Anim Move Keys" -msgstr "Animáció kulcs mozgatás" +msgstr "Animáció kulcsok mozgatása" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Clipboard is empty" -msgstr "Az erÅ‘forrás vágólap üres!" +msgstr "A vágólap üres" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Paste Tracks" -msgstr "Paraméterek Beillesztése" +msgstr "Nyomvonalak beillesztése" #: editor/animation_track_editor.cpp +#, fuzzy msgid "Anim Scale Keys" msgstr "Animáció kulcsok nyújtás" @@ -510,14 +505,13 @@ msgstr "" #: editor/animation_track_editor.cpp msgid "Warning: Editing imported animation" -msgstr "" +msgstr "Figyelmeztetés: Importált animáció szerkesztése" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Select an AnimationPlayer node to create and edit animations." msgstr "" -"Válasszon egy AnimationPlayer-t a Jelenetfából, hogy animációkat " -"szerkeszthessen." +"Válasszon egy AnimationPlayer node-ot az animációk létrehozásához és " +"szerkesztéséhez." #: editor/animation_track_editor.cpp msgid "Only show tracks from nodes selected in tree." @@ -528,22 +522,21 @@ msgid "Group tracks by node or display them as plain list." msgstr "" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Snap:" -msgstr "Illesztés" +msgstr "Illesztés:" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Animation step value." -msgstr "Az animációs fa érvényes." +msgstr "Animáció lépés értéke." #: editor/animation_track_editor.cpp msgid "Seconds" -msgstr "" +msgstr "Másodperc" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" -msgstr "" +msgstr "FPS" #: editor/animation_track_editor.cpp editor/editor_properties.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp @@ -556,18 +549,16 @@ msgid "Edit" msgstr "Szerkesztés" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Animation properties." -msgstr "AnimációFa" +msgstr "Animáció tulajdonságok." #: editor/animation_track_editor.cpp -#, fuzzy msgid "Copy Tracks" -msgstr "Paraméterek Másolása" +msgstr "Nyomvonalak másolása" #: editor/animation_track_editor.cpp msgid "Scale Selection" -msgstr "Kiválasztás átméretezés" +msgstr "Kijelölés átméretezése" #: editor/animation_track_editor.cpp msgid "Scale From Cursor" @@ -575,16 +566,15 @@ msgstr "Ãtméretezés a kurzortól" #: editor/animation_track_editor.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Duplicate Selection" -msgstr "Kiválasztás megkettÅ‘zés" +msgstr "Kijelölés megkettÅ‘zése" #: editor/animation_track_editor.cpp msgid "Duplicate Transposed" -msgstr "Ãthelyezettek megkettÅ‘zés" +msgstr "Ãthelyezettek megkettÅ‘zése" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Delete Selection" -msgstr "Kijelölés Középre" +msgstr "Kijelölés törlése" #: editor/animation_track_editor.cpp #, fuzzy @@ -592,21 +582,20 @@ msgid "Go to Next Step" msgstr "Ugrás a következÅ‘ lépésre" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Go to Previous Step" msgstr "Ugrás az elÅ‘zÅ‘ lépésre" #: editor/animation_track_editor.cpp msgid "Optimize Animation" -msgstr "Animáció optimalizálás" +msgstr "Animáció optimalizálása" #: editor/animation_track_editor.cpp msgid "Clean-Up Animation" -msgstr "Animáció megtisztÃtás" +msgstr "Animáció tisztÃtása" #: editor/animation_track_editor.cpp msgid "Pick the node that will be animated:" -msgstr "" +msgstr "Válassza ki az animálandó node-ot:" #: editor/animation_track_editor.cpp msgid "Use Bezier Curves" @@ -614,19 +603,19 @@ msgstr "Bézier görbék használata" #: editor/animation_track_editor.cpp msgid "Anim. Optimizer" -msgstr "Animáció Optimalizáló" +msgstr "Animáció optimalizáló" #: editor/animation_track_editor.cpp msgid "Max. Linear Error:" -msgstr "Max. Lineáris Hiba:" +msgstr "Maximum lineáris hiba:" #: editor/animation_track_editor.cpp msgid "Max. Angular Error:" -msgstr "Max. Szög Hiba:" +msgstr "Maximum szög hiba:" #: editor/animation_track_editor.cpp msgid "Max Optimizable Angle:" -msgstr "Max. Optimalizálható Szög:" +msgstr "Maximum optimalizálható szög:" #: editor/animation_track_editor.cpp msgid "Optimize" @@ -657,9 +646,8 @@ msgid "Scale Ratio:" msgstr "Méretezési arány:" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Select Tracks to Copy" -msgstr "Ãtmenet beállÃtása erre:" +msgstr "Másolandó nyomvonalak kiválasztása" #: editor/animation_track_editor.cpp editor/editor_log.cpp #: editor/editor_properties.cpp @@ -671,14 +659,12 @@ msgid "Copy" msgstr "Másolás" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Select All/None" -msgstr "Kiválasztó Mód" +msgstr "Összes/semmi kijelölése" #: editor/animation_track_editor_plugins.cpp -#, fuzzy msgid "Add Audio Track Clip" -msgstr "Animáció nyomvonal hozzáadás" +msgstr "" #: editor/animation_track_editor_plugins.cpp msgid "Change Audio Track Clip Start Offset" @@ -690,57 +676,56 @@ msgstr "" #: editor/array_property_edit.cpp msgid "Resize Array" -msgstr "Tömb Ãtméretezése" +msgstr "Tömb átméretezése" #: editor/array_property_edit.cpp msgid "Change Array Value Type" -msgstr "Tömb ÉrtéktÃpusának Megváltoztatása" +msgstr "Tömb értéktÃpusának megváltoztatása" #: editor/array_property_edit.cpp msgid "Change Array Value" -msgstr "Tömb Értékének Megváltoztatása" +msgstr "Tömb értékének megváltoztatása" #: editor/code_editor.cpp msgid "Go to Line" -msgstr "Ugrás Sorra" +msgstr "Ugrás sorra" #: editor/code_editor.cpp msgid "Line Number:" msgstr "Sorszám:" #: editor/code_editor.cpp -#, fuzzy msgid "%d replaced." -msgstr "Csere..." +msgstr "%d lecserélve." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." -msgstr "" +msgstr "%d egyezés." #: editor/code_editor.cpp editor/editor_help.cpp -#, fuzzy msgid "%d matches." -msgstr "Nincs Találat" +msgstr "%d egyezés." #: editor/code_editor.cpp editor/find_in_files.cpp msgid "Match Case" -msgstr "Pontos Egyezés" +msgstr "Nagybetűérzékeny" #: editor/code_editor.cpp editor/find_in_files.cpp msgid "Whole Words" -msgstr "Egész Szavak" +msgstr "Egész szavak" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" -msgstr "Lecserélés" +msgstr "Csere" #: editor/code_editor.cpp msgid "Replace All" -msgstr "Mind Lecserélése" +msgstr "Összes cseréje" #: editor/code_editor.cpp +#, fuzzy msgid "Selection Only" -msgstr "Csak Kiválsztás" +msgstr "Csak a kijelölés" #: editor/code_editor.cpp editor/plugins/script_text_editor.cpp #: editor/plugins/text_editor.cpp @@ -748,8 +733,9 @@ msgid "Standard" msgstr "" #: editor/code_editor.cpp editor/plugins/script_editor_plugin.cpp +#, fuzzy msgid "Toggle Scripts Panel" -msgstr "Szkript Panel MegjelenÃtése" +msgstr "Szkript panel váltása" #: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/texture_region_editor_plugin.cpp @@ -765,54 +751,47 @@ msgstr "KicsinyÃtés" #: editor/code_editor.cpp msgid "Reset Zoom" -msgstr "NagyÃtás VisszaállÃtása" +msgstr "NagyÃtás visszaállÃtása" #: editor/code_editor.cpp msgid "Warnings" -msgstr "" +msgstr "Figyelmeztetések" #: editor/code_editor.cpp msgid "Line and column numbers." -msgstr "" +msgstr "Sor és oszlopszámok." #: editor/connections_dialog.cpp -#, fuzzy msgid "Method in target node must be specified." -msgstr "Nevezze meg a metódust a cél Node-ban!" +msgstr "" #: editor/connections_dialog.cpp -#, fuzzy msgid "Method name must be a valid identifier." -msgstr "Nevezze meg a metódust a cél Node-ban!" +msgstr "A metódusnévnek érvényes azonosÃtónak kell lennie." #: editor/connections_dialog.cpp -#, fuzzy msgid "" "Target method not found. Specify a valid method or attach a script to the " "target node." msgstr "" -"Nem található a cél metódus! Nevezzen meg egy érvényes metódust, vagy " -"csatoljon egy szkriptet a cél Node-hoz." +"Nem található a célmetódus! Nevezzen meg egy érvényes metódust, vagy " +"csatoljon egy szkriptet a cél node-hoz." #: editor/connections_dialog.cpp -#, fuzzy msgid "Connect to Node:" -msgstr "Csatlakoztatás Node-hoz:" +msgstr "Csatlakoztatás node-hoz:" #: editor/connections_dialog.cpp -#, fuzzy msgid "Connect to Script:" -msgstr "Nem lehet csatlakozni a kiszolgálóhoz:" +msgstr "Csatlakoztatás szkripthez:" #: editor/connections_dialog.cpp -#, fuzzy msgid "From Signal:" -msgstr "Jelzések:" +msgstr "JelzésbÅ‘l:" #: editor/connections_dialog.cpp -#, fuzzy msgid "Scene does not contain any script." -msgstr "A Node nem tartalmaz geometriát." +msgstr "A jelenet nem tartalmaz szkriptet." #: editor/connections_dialog.cpp editor/editor_autoload_settings.cpp #: editor/groups_editor.cpp editor/plugins/item_list_editor_plugin.cpp @@ -833,21 +812,19 @@ msgstr "EltávolÃtás" #: editor/connections_dialog.cpp msgid "Add Extra Call Argument:" -msgstr "További MeghÃvási Argumentum Hozzáadása:" +msgstr "További meghÃvási argumentum hozzáadása:" #: editor/connections_dialog.cpp msgid "Extra Call Arguments:" -msgstr "További MeghÃvási Argumentumok:" +msgstr "További hÃvási argumentumok:" #: editor/connections_dialog.cpp -#, fuzzy msgid "Receiver Method:" -msgstr "Objektumtulajdonságok." +msgstr "Fogadó metódus:" #: editor/connections_dialog.cpp -#, fuzzy msgid "Advanced" -msgstr "Illesztési beállÃtások" +msgstr "Speciális" #: editor/connections_dialog.cpp msgid "Deferred" @@ -864,12 +841,11 @@ msgstr "Egyszeri" #: editor/connections_dialog.cpp msgid "Disconnects the signal after its first emission." -msgstr "" +msgstr "Az elsÅ‘ kibocsátás után lekapcsolja a jelzést." #: editor/connections_dialog.cpp -#, fuzzy msgid "Cannot connect signal" -msgstr "Csatlakoztató Jelzés:" +msgstr "Nem lehet csatlakoztatni a jelet" #: editor/connections_dialog.cpp editor/dependency_editor.cpp #: editor/export_template_manager.cpp editor/groups_editor.cpp @@ -890,26 +866,24 @@ msgid "Connect" msgstr "Csatlakoztatás" #: editor/connections_dialog.cpp -#, fuzzy msgid "Signal:" -msgstr "Jelzések:" +msgstr "Jelzés:" #: editor/connections_dialog.cpp msgid "Connect '%s' to '%s'" -msgstr "'%s' Csatlakoztatása '%s'-hez" +msgstr "'%s' csatlakoztatása ehhez: '%s'" #: editor/connections_dialog.cpp msgid "Disconnect '%s' from '%s'" -msgstr "'%s' Lecsatlakoztatása '%s'-ról" +msgstr "'%s' leválasztása errÅ‘l: '%s'" #: editor/connections_dialog.cpp -#, fuzzy msgid "Disconnect all from signal: '%s'" -msgstr "'%s' Lecsatlakoztatása '%s'-ról" +msgstr "Az összes leválasztása a jelzésrÅ‘l: '%s'" #: editor/connections_dialog.cpp msgid "Connect..." -msgstr "Kapcsolás..." +msgstr "Csatlakoztatás..." #: editor/connections_dialog.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp @@ -917,45 +891,45 @@ msgid "Disconnect" msgstr "Leválasztás" #: editor/connections_dialog.cpp -#, fuzzy msgid "Connect a Signal to a Method" -msgstr "Csatlakoztató Jelzés:" +msgstr "Jelzés csatlakoztatása metódushoz" #: editor/connections_dialog.cpp -#, fuzzy msgid "Edit Connection:" -msgstr "Kapcsolathiba" +msgstr "Kapcsolat szerkesztése:" #: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from the \"%s\" signal?" -msgstr "" +msgstr "Biztosan eltávolÃtja az összes kapcsolatot a(z) \"%s\" jelzésrÅ‘l?" #: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp msgid "Signals" msgstr "Jelzések" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Csempék szűrése" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" -msgstr "" +msgstr "Biztosan eltávolÃtja az összes kapcsolatot errÅ‘l a jelzésrÅ‘l?" #: editor/connections_dialog.cpp -#, fuzzy msgid "Disconnect All" -msgstr "Szétkapcsol" +msgstr "Összes lecsatlakoztatása" #: editor/connections_dialog.cpp -#, fuzzy msgid "Edit..." -msgstr "Szerkesztés" +msgstr "Szerkesztés..." #: editor/connections_dialog.cpp -#, fuzzy msgid "Go To Method" -msgstr "Metódusok" +msgstr "Ugrás metódusra" #: editor/create_dialog.cpp msgid "Change %s Type" -msgstr "%s TÃpusának Megváltoztatása" +msgstr "%s tÃpusának megváltoztatása" #: editor/create_dialog.cpp editor/project_settings_editor.cpp msgid "Change" @@ -963,7 +937,7 @@ msgstr "Változtatás" #: editor/create_dialog.cpp msgid "Create New %s" -msgstr "Új %s Létrehozása" +msgstr "Új %s létrehozása" #: editor/create_dialog.cpp editor/editor_file_dialog.cpp #: editor/filesystem_dock.cpp @@ -972,10 +946,10 @@ msgstr "Kedvencek:" #: editor/create_dialog.cpp editor/editor_file_dialog.cpp msgid "Recent:" -msgstr "Legutolsó:" +msgstr "Legutóbbi:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Keresés:" @@ -984,7 +958,7 @@ msgstr "Keresés:" #: editor/property_selector.cpp editor/quick_open.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Matches:" -msgstr "Találatok:" +msgstr "Egyezések:" #: editor/create_dialog.cpp editor/editor_plugin_settings.cpp #: editor/plugin_config_dialog.cpp @@ -996,29 +970,27 @@ msgstr "LeÃrás:" #: editor/dependency_editor.cpp msgid "Search Replacement For:" -msgstr "Csere Keresése:" +msgstr "Csere keresése:" #: editor/dependency_editor.cpp msgid "Dependencies For:" msgstr "FüggÅ‘ségek:" #: editor/dependency_editor.cpp -#, fuzzy msgid "" "Scene '%s' is currently being edited.\n" "Changes will only take effect when reloaded." msgstr "" -"'%s' Scene éppen szerkesztés alatt áll.\n" +"'%s' jelenet éppen szerkesztés alatt áll.\n" "A változások újratöltés után lépnek érvénybe." #: editor/dependency_editor.cpp -#, fuzzy msgid "" "Resource '%s' is in use.\n" "Changes will only take effect when reloaded." msgstr "" -"'%s' forrás éppen használatban van.\n" -"A változtatások akkor lépnek életbe, ha a forrást újratölti." +"A(z) '%s' forrás éppen használatban van.\n" +"A változtatások újratöltéskor lépnek életbe." #: editor/dependency_editor.cpp #: modules/gdnative/gdnative_library_editor_plugin.cpp @@ -1065,7 +1037,6 @@ msgid "Owners Of:" msgstr "Tulajdonosai:" #: editor/dependency_editor.cpp -#, fuzzy msgid "Remove selected files from the project? (Can't be restored)" msgstr "EltávolÃtja a kiválasztott fájlokat a projektbÅ‘l? (nem visszavonható)" @@ -1087,9 +1058,8 @@ msgid "Error loading:" msgstr "Hiba betöltéskor:" #: editor/dependency_editor.cpp -#, fuzzy msgid "Load failed due to missing dependencies:" -msgstr "A Jelenetet nem sikerült betölteni a hiányzó függÅ‘ségek miatt:" +msgstr "A betöltés nem sikerült a hiányzó függÅ‘ségek miatt:" #: editor/dependency_editor.cpp editor/editor_node.cpp msgid "Open Anyway" @@ -1112,9 +1082,8 @@ msgid "Permanently delete %d item(s)? (No undo!)" msgstr "Véglegesen törlöl %d elemet? (Nem visszavonható!)" #: editor/dependency_editor.cpp -#, fuzzy msgid "Show Dependencies" -msgstr "FüggÅ‘ségek" +msgstr "FüggÅ‘ségek megjelenÃtése" #: editor/dependency_editor.cpp msgid "Orphan Resource Explorer" @@ -1184,14 +1153,12 @@ msgid "Gold Sponsors" msgstr "Arany Szponzorok" #: editor/editor_about.cpp -#, fuzzy msgid "Silver Sponsors" -msgstr "Ezüst Adományozók" +msgstr "Ezüst adományozók" #: editor/editor_about.cpp -#, fuzzy msgid "Bronze Sponsors" -msgstr "Bronz Adományozók" +msgstr "Bronz adományozók" #: editor/editor_about.cpp msgid "Mini Sponsors" @@ -1218,9 +1185,8 @@ msgid "License" msgstr "Licenc" #: editor/editor_about.cpp -#, fuzzy msgid "Third-party Licenses" -msgstr "Harmadik Fél Engedély" +msgstr "Harmadik féltÅ‘l származó licencek" #: editor/editor_about.cpp #, fuzzy @@ -1248,14 +1214,12 @@ msgid "Licenses" msgstr "Licencek" #: editor/editor_asset_installer.cpp editor/project_manager.cpp -#, fuzzy msgid "Error opening package file, not in ZIP format." -msgstr "Hiba a csomagfájl megnyitása során, nem zip formátumú." +msgstr "Hiba a csomagfájl megnyitása során, nem ZIP formátumú." #: editor/editor_asset_installer.cpp -#, fuzzy msgid "%s (Already Exists)" -msgstr "Már létezik '%s' AutoLoad!" +msgstr "'%s' (már létezik)" #: editor/editor_asset_installer.cpp msgid "Uncompressing Assets" @@ -1263,17 +1227,15 @@ msgstr "Eszközök Kicsomagolása" #: editor/editor_asset_installer.cpp editor/project_manager.cpp msgid "The following files failed extraction from package:" -msgstr "" +msgstr "A következÅ‘ fájlokat nem sikerült kibontani a csomagból:" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "And %s more files." -msgstr "%d további fájl" +msgstr "És további %s fájl." #: editor/editor_asset_installer.cpp editor/project_manager.cpp -#, fuzzy msgid "Package installed successfully!" -msgstr "A Csomag TelepÃtése Sikeresen Megtörtént!" +msgstr "A csomag telepÃtése sikeres volt!" #: editor/editor_asset_installer.cpp #: editor/plugins/asset_library_editor_plugin.cpp @@ -1281,9 +1243,8 @@ msgid "Success!" msgstr "Siker!" #: editor/editor_asset_installer.cpp -#, fuzzy msgid "Package Contents:" -msgstr "Tartalom:" +msgstr "Csomag tartalma:" #: editor/editor_asset_installer.cpp editor/editor_node.cpp msgid "Install" @@ -1338,9 +1299,8 @@ msgid "Delete Bus Effect" msgstr "Busz Effektus Törlése" #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Drag & drop to rearrange." -msgstr "Hangbusz, Húzd és Vidd az átrendezéshez." +msgstr "Az átrendezéshez húzza át." #: editor/editor_audio_buses.cpp msgid "Solo" @@ -1413,7 +1373,7 @@ msgstr "Hangbusz Elrendezés Megnyitása" #: editor/editor_audio_buses.cpp msgid "There is no '%s' file." -msgstr "" +msgstr "Nincs '%s' fájl." #: editor/editor_audio_buses.cpp editor/plugins/canvas_item_editor_plugin.cpp msgid "Layout" @@ -1424,18 +1384,16 @@ msgid "Invalid file, not an audio bus layout." msgstr "Érvénytelen fájl, nem egy hangbusz elrendezés." #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Error saving file: %s" -msgstr "Hiba TileSet mentésekor!" +msgstr "Hiba a fájl mentésekor: %s" #: editor/editor_audio_buses.cpp msgid "Add Bus" msgstr "Busz Hozzáadása" #: editor/editor_audio_buses.cpp -#, fuzzy msgid "Add a new Audio Bus to this layout." -msgstr "Hangbusz Elrendezés Mentése Másként..." +msgstr "Új hangbusz hozzáadása ehhez az elrendezéshez." #: editor/editor_audio_buses.cpp editor/editor_properties.cpp #: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp @@ -1476,24 +1434,21 @@ msgid "Valid characters:" msgstr "Érvényes karakterek:" #: editor/editor_autoload_settings.cpp -#, fuzzy msgid "Must not collide with an existing engine class name." -msgstr "Érvénytelen név. Nem ütközhet egy már meglévÅ‘ motor osztálynévvel." +msgstr "Nem ütközhet egy már meglévÅ‘ játékmotor-osztálynévvel." #: editor/editor_autoload_settings.cpp -#, fuzzy msgid "Must not collide with an existing built-in type name." msgstr "Érvénytelen név. Nem ütközhet egy már meglévÅ‘ beépÃtett tÃpusnévvel." #: editor/editor_autoload_settings.cpp -#, fuzzy msgid "Must not collide with an existing global constant name." msgstr "" "Érvénytelen név. Nem ütközhet egy már meglévÅ‘ globális konstans névvel." #: editor/editor_autoload_settings.cpp msgid "Keyword cannot be used as an autoload name." -msgstr "" +msgstr "A kulcsszó nem használható automatikus betöltési névként." #: editor/editor_autoload_settings.cpp msgid "Autoload '%s' already exists!" @@ -1525,7 +1480,7 @@ msgstr "AutoLoad-ok Ãtrendezése" #: editor/editor_autoload_settings.cpp msgid "Can't add autoload:" -msgstr "" +msgstr "Nem lehet hozzáadni az automatikus betöltést:" #: editor/editor_autoload_settings.cpp msgid "Add AutoLoad" @@ -1577,9 +1532,8 @@ msgid "[unsaved]" msgstr "[nincs mentve]" #: editor/editor_dir_dialog.cpp -#, fuzzy msgid "Please select a base directory first." -msgstr "Válasszon egy alap könyvtárat elÅ‘ször" +msgstr "ElÅ‘ször válassza ki az alapkönyvtárat." #: editor/editor_dir_dialog.cpp msgid "Choose a Directory" @@ -1613,7 +1567,7 @@ msgstr "Tároló Fájl:" #: editor/editor_export.cpp msgid "No export template found at the expected path:" -msgstr "" +msgstr "Nem található export sablon a várt útvonalon:" #: editor/editor_export.cpp msgid "Packing" @@ -1642,15 +1596,14 @@ msgstr "" #: editor/editor_export.cpp platform/android/export/export.cpp #: platform/iphone/export/export.cpp platform/javascript/export/export.cpp #: platform/osx/export/export.cpp platform/uwp/export/export.cpp -#, fuzzy msgid "Custom debug template not found." -msgstr "Sablon fájl nem található:" +msgstr "Az egyéni hibakeresési sablon nem található." #: editor/editor_export.cpp platform/android/export/export.cpp #: platform/iphone/export/export.cpp platform/javascript/export/export.cpp #: platform/osx/export/export.cpp platform/uwp/export/export.cpp msgid "Custom release template not found." -msgstr "" +msgstr "Az egyéni kiadási sablon nem található." #: editor/editor_export.cpp platform/javascript/export/export.cpp msgid "Template file not found:" @@ -1661,119 +1614,107 @@ msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB." msgstr "" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "3D Editor" -msgstr "SzerkesztÅ‘" +msgstr "3D szerkesztÅ‘" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Script Editor" -msgstr "Szkript SzerkesztÅ‘ Megnyitása" +msgstr "Szkript szerkesztÅ‘" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Asset Library" -msgstr "Eszköz Könyvtár Megnyitása" +msgstr "Eszköz könyvtár" #: editor/editor_feature_profile.cpp msgid "Scene Tree Editing" -msgstr "" - -#: editor/editor_feature_profile.cpp -#, fuzzy -msgid "Import Dock" -msgstr "Importálás" +msgstr "Jelenetfa szerkesztése" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Node Dock" -msgstr "Mozgás Mód" +msgstr "" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "FileSystem and Import Docks" +msgid "FileSystem Dock" msgstr "Fájlrendszer" #: editor/editor_feature_profile.cpp -#, fuzzy +msgid "Import Dock" +msgstr "Dock importálása" + +#: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" -msgstr "Mind Lecserélése" +msgstr "Törli a(z) '%s' profilt? (nem visszavonható)" #: editor/editor_feature_profile.cpp msgid "Profile must be a valid filename and must not contain '.'" msgstr "" +"A profilnak érvényes fájlnévnek kell lennie, és nem tartalmazhatja a \".\" " +"karaktert" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Profile with this name already exists." -msgstr "Egy fájl vagy mappa már létezik a megadott névvel." +msgstr "Ilyen nevű profil már létezik." #: editor/editor_feature_profile.cpp msgid "(Editor Disabled, Properties Disabled)" -msgstr "" +msgstr "(A szerkesztÅ‘ letiltva, a tulajdonságok letiltva)" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "(Properties Disabled)" -msgstr "Tulajdonságok" +msgstr "(A tulajdonságok le vannak tiltva)" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "(Editor Disabled)" -msgstr "Tiltva" +msgstr "(A szerkesztÅ‘ le van tiltva)" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Class Options:" -msgstr "LeÃrás:" +msgstr "Osztály beállÃtások:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Enable Contextual Editor" -msgstr "KövetkezÅ‘ SzerkesztÅ‘ Megnyitása" +msgstr "KörnyezetfüggÅ‘ szerkesztÅ‘ engedélyezése" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Enabled Properties:" -msgstr "Tulajdonságok" +msgstr "Engedélyezett tulajdonságok:" #: editor/editor_feature_profile.cpp msgid "Enabled Features:" -msgstr "" +msgstr "Engedélyezett funkciók:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Enabled Classes:" -msgstr "Osztályok Keresése" +msgstr "Engedélyezett osztályok:" #: editor/editor_feature_profile.cpp msgid "File '%s' format is invalid, import aborted." -msgstr "" +msgstr "A(z) '%s' fájl formátuma érvénytelen, az importálás megszakÃtva." #: editor/editor_feature_profile.cpp msgid "" "Profile '%s' already exists. Remove it first before importing, import " "aborted." msgstr "" +"A (z) '%s' profil már létezik. Importálás elÅ‘tt elÅ‘ször távolÃtsa el azt, " +"importálás megszakÃtva." #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Error saving profile to path: '%s'." -msgstr "Hiba TileSet mentésekor!" +msgstr "Hiba történt a profil útvonalba mentése során: '%s'." #: editor/editor_feature_profile.cpp msgid "Unset" -msgstr "" +msgstr "Nincs beállÃtva" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Current Profile:" -msgstr "Jelenlegi Verzió:" +msgstr "Jelenlegi profil:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Make Current" -msgstr "Jelenlegi:" +msgstr "Tegye jelenlegivé" #: editor/editor_feature_profile.cpp #: editor/plugins/animation_player_editor_plugin.cpp @@ -1791,44 +1732,36 @@ msgid "Export" msgstr "Exportálás" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Available Profiles:" -msgstr "Tulajdonságok" +msgstr "ElérhetÅ‘ profilok:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Class Options" -msgstr "LeÃrás" +msgstr "Osztály beállÃtásai" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "New profile name:" -msgstr "Új név:" +msgstr "Új profilnév:" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Erase Profile" -msgstr "Jobb Egérgomb: Pont Törlése." +msgstr "Profil törlése" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Godot Feature Profile" -msgstr "Export Sablonok Kezelése" +msgstr "Godot funkcióprofil" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Import Profile(s)" -msgstr "%d további fájl" +msgstr "Profil(ok) importálása" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Export Profile" -msgstr "Projekt Exportálása" +msgstr "Profil exportálása" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Manage Editor Feature Profiles" -msgstr "Export Sablonok Kezelése" +msgstr "A szerkesztÅ‘ funkcióprofiljainak kezelése" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Select Current Folder" @@ -1839,24 +1772,21 @@ msgid "File Exists, Overwrite?" msgstr "Fájl Létezik, FelülÃrja?" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp -#, fuzzy msgid "Select This Folder" -msgstr "Aktuális Mappa Kiválasztása" +msgstr "Válassza ezt a mappát" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "Copy Path" msgstr "Útvonal másolása" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp -#, fuzzy msgid "Open in File Manager" -msgstr "Mutat FájlkezelÅ‘ben" +msgstr "Megnyitás a FájlkezelÅ‘ben" #: editor/editor_file_dialog.cpp editor/editor_node.cpp #: editor/filesystem_dock.cpp editor/project_manager.cpp -#, fuzzy msgid "Show in File Manager" -msgstr "Mutat FájlkezelÅ‘ben" +msgstr "MegjelenÃtés a FájlkezelÅ‘ben" #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp msgid "New Folder..." @@ -1916,67 +1846,60 @@ msgstr "Ugrás Fel" #: editor/editor_file_dialog.cpp msgid "Toggle Hidden Files" -msgstr "Rejtett Fájlok MegjelenÃtése" +msgstr "" #: editor/editor_file_dialog.cpp msgid "Toggle Favorite" -msgstr "Kedvenc Kapcsolása" +msgstr "" #: editor/editor_file_dialog.cpp msgid "Toggle Mode" -msgstr "Mód Váltása" +msgstr "Mód váltása" #: editor/editor_file_dialog.cpp msgid "Focus Path" -msgstr "Elérési Út Fókuszálása" +msgstr "" #: editor/editor_file_dialog.cpp msgid "Move Favorite Up" -msgstr "Kedvenc Felfelé Mozgatása" +msgstr "Kedvenc fentebb helyezése" #: editor/editor_file_dialog.cpp msgid "Move Favorite Down" -msgstr "Kedvenc Lefelé Mozgatása" +msgstr "Kedvenc lentebb helyezése" #: editor/editor_file_dialog.cpp -#, fuzzy msgid "Go to previous folder." -msgstr "Ugrás a szülÅ‘mappába" +msgstr "Ugrás az elÅ‘zÅ‘ mappára." #: editor/editor_file_dialog.cpp -#, fuzzy msgid "Go to next folder." -msgstr "Ugrás a szülÅ‘mappába" +msgstr "Ugrás a következÅ‘ mappára." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp -#, fuzzy msgid "Go to parent folder." -msgstr "Ugrás a szülÅ‘mappába" +msgstr "Lépjen a szülÅ‘mappába." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp -#, fuzzy msgid "Refresh files." -msgstr "Osztályok Keresése" +msgstr "Fájlok frissÃtése." #: editor/editor_file_dialog.cpp -#, fuzzy msgid "(Un)favorite current folder." -msgstr "Nem sikerült létrehozni a mappát." +msgstr "Jelenlegi mappa kedvenccé tétele/eltávolÃtása a kedvencek közül." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp -#, fuzzy msgid "Toggle the visibility of hidden files." -msgstr "Rejtett Fájlok MegjelenÃtése" +msgstr "A rejtett fájlok láthatóságának ki- és bekapcsolása." #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp #, fuzzy msgid "View items as a grid of thumbnails." -msgstr "Elemek kirajzolása indexképek rácsába" +msgstr "Az elemek megtekintése bélyegkép-rácsként." #: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp -#, fuzzy msgid "View items as a list." -msgstr "Elemek listázása" +msgstr "Elemek megtekintése listaként." #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Directories & Files:" @@ -1984,7 +1907,7 @@ msgstr "Könyvtárak és Fájlok:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "ElÅ‘nézet:" @@ -2028,14 +1951,12 @@ msgid "Inherited by:" msgstr "Åt örökli:" #: editor/editor_help.cpp -#, fuzzy msgid "Description" -msgstr "LeÃrás:" +msgstr "LeÃrás" #: editor/editor_help.cpp -#, fuzzy msgid "Online Tutorials" -msgstr "Online Oktatóanyagok:" +msgstr "Online oktatóanyagok" #: editor/editor_help.cpp msgid "Properties" @@ -2043,21 +1964,19 @@ msgstr "Tulajdonságok" #: editor/editor_help.cpp msgid "override:" -msgstr "" +msgstr "felülÃrja:" #: editor/editor_help.cpp -#, fuzzy msgid "default:" -msgstr "Alapértelmezett" +msgstr "alapértelmezett:" #: editor/editor_help.cpp msgid "Methods" msgstr "Metódusok" #: editor/editor_help.cpp -#, fuzzy msgid "Theme Properties" -msgstr "Tulajdonságok" +msgstr "Téma tulajdonságai" #: editor/editor_help.cpp msgid "Enumerations" @@ -2068,14 +1987,12 @@ msgid "Constants" msgstr "Konstansok" #: editor/editor_help.cpp -#, fuzzy msgid "Property Descriptions" -msgstr "Tulajdonság LeÃrása:" +msgstr "TulajdonságleÃrások" #: editor/editor_help.cpp -#, fuzzy msgid "(value)" -msgstr "Érték:" +msgstr "(érték)" #: editor/editor_help.cpp msgid "" @@ -2086,9 +2003,8 @@ msgstr "" "[color=$color][url=$url]hozzájárul eggyel[/url][/color]!" #: editor/editor_help.cpp -#, fuzzy msgid "Method Descriptions" -msgstr "Metódus LeÃrás:" +msgstr "MetódusleÃrások" #: editor/editor_help.cpp msgid "" @@ -2101,106 +2017,92 @@ msgstr "" #: editor/editor_help_search.cpp editor/editor_node.cpp #: editor/plugins/script_editor_plugin.cpp msgid "Search Help" -msgstr "Keresés Súgóban" +msgstr "Keresés a súgóban" #: editor/editor_help_search.cpp msgid "Case Sensitive" msgstr "Pontos Egyezés" #: editor/editor_help_search.cpp -#, fuzzy msgid "Show Hierarchy" -msgstr "SegÃtÅ‘k MegjelenÃtése" +msgstr "Hierarchia megjelenÃtése" #: editor/editor_help_search.cpp -#, fuzzy msgid "Display All" -msgstr "Mind Lecserélése" +msgstr "Az összes megjelenÃtése" #: editor/editor_help_search.cpp -#, fuzzy msgid "Classes Only" -msgstr "Osztályok" +msgstr "Csak osztályok" #: editor/editor_help_search.cpp -#, fuzzy msgid "Methods Only" -msgstr "Metódusok" +msgstr "Csak metódusok" #: editor/editor_help_search.cpp -#, fuzzy msgid "Signals Only" -msgstr "Jelzések" +msgstr "Csak jelzések" #: editor/editor_help_search.cpp -#, fuzzy msgid "Constants Only" -msgstr "Konstansok" +msgstr "Csak konstansok" #: editor/editor_help_search.cpp -#, fuzzy msgid "Properties Only" -msgstr "Tulajdonságok" +msgstr "Csak tulajdonságok" #: editor/editor_help_search.cpp -#, fuzzy msgid "Theme Properties Only" -msgstr "Tulajdonságok" +msgstr "Csak tématulajdonságok" #: editor/editor_help_search.cpp -#, fuzzy msgid "Member Type" -msgstr "Tagok" +msgstr "Tag tÃpusa" #: editor/editor_help_search.cpp -#, fuzzy msgid "Class" -msgstr "Osztály:" +msgstr "Osztály" #: editor/editor_help_search.cpp -#, fuzzy msgid "Method" -msgstr "Metódusok" +msgstr "Metódus" #: editor/editor_help_search.cpp editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Signal" -msgstr "Jelzések" +msgstr "Jelzés" #: editor/editor_help_search.cpp editor/plugins/theme_editor_plugin.cpp msgid "Constant" msgstr "Ãllandó" #: editor/editor_help_search.cpp -#, fuzzy msgid "Property" -msgstr "Tulajdonságok" +msgstr "Tulajdonság" #: editor/editor_help_search.cpp -#, fuzzy msgid "Theme Property" -msgstr "Tulajdonságok" +msgstr "Téma tulajdonság" #: editor/editor_inspector.cpp editor/project_settings_editor.cpp msgid "Property:" -msgstr "" +msgstr "Tulajdonság:" #: editor/editor_inspector.cpp +#, fuzzy msgid "Set" -msgstr "" +msgstr "BeállÃtás" #: editor/editor_inspector.cpp msgid "Set Multiple:" -msgstr "" +msgstr "Többszörös beállÃtása:" #: editor/editor_log.cpp msgid "Output:" msgstr "Kimenet:" #: editor/editor_log.cpp editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Copy Selection" -msgstr "Kiválasztás eltávolÃtás" +msgstr "Kijelölés másolása" #: editor/editor_log.cpp editor/editor_network_profiler.cpp #: editor/editor_profiler.cpp editor/editor_properties.cpp @@ -2214,7 +2116,7 @@ msgstr "Töröl" #: editor/editor_log.cpp msgid "Clear Output" -msgstr "Kimenet Törlése" +msgstr "Kimenet törlése" #: editor/editor_network_profiler.cpp editor/editor_node.cpp #: editor/editor_profiler.cpp @@ -2223,22 +2125,20 @@ msgstr "LeállÃtás" #: editor/editor_network_profiler.cpp editor/editor_profiler.cpp #: editor/plugins/animation_state_machine_editor.cpp editor/rename_dialog.cpp -#, fuzzy msgid "Start" -msgstr "Start!" +msgstr "Start" #: editor/editor_network_profiler.cpp msgid "%s/s" -msgstr "" +msgstr "%s/s" #: editor/editor_network_profiler.cpp -#, fuzzy msgid "Down" -msgstr "Letöltés" +msgstr "Le" #: editor/editor_network_profiler.cpp msgid "Up" -msgstr "" +msgstr "Fel" #: editor/editor_network_profiler.cpp editor/editor_node.cpp msgid "Node" @@ -2246,27 +2146,27 @@ msgstr "Node" #: editor/editor_network_profiler.cpp msgid "Incoming RPC" -msgstr "" +msgstr "BejövÅ‘ RPC" #: editor/editor_network_profiler.cpp msgid "Incoming RSET" -msgstr "" +msgstr "BejövÅ‘ RSET" #: editor/editor_network_profiler.cpp msgid "Outgoing RPC" -msgstr "" +msgstr "KimenÅ‘ RPC" #: editor/editor_network_profiler.cpp msgid "Outgoing RSET" -msgstr "" +msgstr "KimenÅ‘ RSET" #: editor/editor_node.cpp editor/project_manager.cpp msgid "New Window" -msgstr "" +msgstr "Új ablak" #: editor/editor_node.cpp msgid "Imported resources can't be saved." -msgstr "" +msgstr "Az importált erÅ‘források nem menthetÅ‘k." #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: scene/gui/dialogs.cpp @@ -2282,6 +2182,8 @@ msgid "" "This resource can't be saved because it does not belong to the edited scene. " "Make it unique first." msgstr "" +"Ezt az erÅ‘forrást nem menthetÅ‘, mert nem tartozik a szerkesztett jelenethez. " +"ElÅ‘ször tegye egyedivé." #: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp msgid "Save Resource As..." @@ -2302,6 +2204,7 @@ msgstr "Hiba történt mentés közben." #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp msgid "Can't open '%s'. The file could have been moved or deleted." msgstr "" +"A(z) '%s' nem nyitható meg. Lehet, hogy a fájlt áthelyezték vagy törölték." #: editor/editor_node.cpp msgid "Error while parsing '%s'." @@ -2351,7 +2254,7 @@ msgstr "" #: editor/editor_node.cpp editor/scene_tree_dock.cpp msgid "Can't overwrite scene that is still open!" -msgstr "" +msgstr "Nem lehet felülÃrni a még nyitott jelenetet!" #: editor/editor_node.cpp msgid "Can't load MeshLibrary for merging!" @@ -2398,14 +2301,13 @@ msgstr "" "jobban megértse ezt a munkafolyamatot." #: editor/editor_node.cpp -#, fuzzy msgid "" "This resource belongs to a scene that was instanced or inherited.\n" "Changes to it won't be kept when saving the current scene." msgstr "" -"Ez az erÅ‘forrás egy olyan Scene-hez tartozik amit példányosÃtottak vagy " +"Ez az erÅ‘forrás egy olyan jelenethez tartozik ami példányosÃtott vagy " "örökölt.\n" -"A módosÃtások nem lesznek megtartva a jelenlegi Scene mentésekor." +"A módosÃtások nem lesznek megtartva a jelenlegi jelenet mentésekor." #: editor/editor_node.cpp msgid "" @@ -2416,21 +2318,19 @@ msgstr "" "beállÃtásait az import panelen, és importálja újból." #: editor/editor_node.cpp -#, fuzzy msgid "" "This scene was imported, so changes to it won't be kept.\n" "Instancing it or inheriting will allow making changes to it.\n" "Please read the documentation relevant to importing scenes to better " "understand this workflow." msgstr "" -"Ezt a jelenetet importálta, Ãgy a rajta végzett módosÃtások nem lesznek " +"Ez a jelenetet importált, Ãgy a rajta végzett módosÃtások nem lesznek " "megtartva.\n" "Változtatásokat végezhet rajta, ha példányosÃtja, vagy leszármaztatja.\n" "Olvassa el a jelenetek importálásáról szóló megfelelÅ‘ dokumentációt, hogy " "jobban megértse ezt a munkafolyamatot." #: editor/editor_node.cpp -#, fuzzy msgid "" "This is a remote object, so changes to it won't be kept.\n" "Please read the documentation relevant to debugging to better understand " @@ -2458,9 +2358,8 @@ msgid "Open Base Scene" msgstr "Alap Scene megnyitás" #: editor/editor_node.cpp -#, fuzzy msgid "Quick Open..." -msgstr "Jelenet gyors megnyitása..." +msgstr "Gyors megnyitás..." #: editor/editor_node.cpp msgid "Quick Open Scene..." @@ -2479,9 +2378,8 @@ msgid "Save changes to '%s' before closing?" msgstr "Bezárás elÅ‘tt menti a '%s'-n végzett módosÃtásokat?" #: editor/editor_node.cpp -#, fuzzy msgid "Saved %s modified resource(s)." -msgstr "Nem sikerült betölteni az erÅ‘forrást." +msgstr "%s módosÃtott erÅ‘forrás mentve." #: editor/editor_node.cpp msgid "A root node is required to save the scene." @@ -2513,7 +2411,7 @@ msgstr "Mesh könyvtár exportálás" #: editor/editor_node.cpp msgid "This operation can't be done without a root node." -msgstr "Ezt a műveletet nem lehet végrehajtani gyökér Node nélkül." +msgstr "Ezt a műveletet nem lehet végrehajtani gyökér node nélkül." #: editor/editor_node.cpp msgid "Export Tile Set" @@ -2532,15 +2430,16 @@ msgid "Can't reload a scene that was never saved." msgstr "Nem lehet újratölteni egy olyan jelenetet, amit soha nem mentett el." #: editor/editor_node.cpp -#, fuzzy msgid "Reload Saved Scene" -msgstr "Scene mentés" +msgstr "Mentett jelenet újratöltése" #: editor/editor_node.cpp msgid "" "The current scene has unsaved changes.\n" "Reload the saved scene anyway? This action cannot be undone." msgstr "" +"Az aktuális jelenet nem mentett módosÃtásokat tartalmaz.\n" +"A mentett jelenetet mindenképp újratölti? Ez a művelet nem visszavonható." #: editor/editor_node.cpp msgid "Quick Run Scene..." @@ -2552,7 +2451,7 @@ msgstr "Kilépés" #: editor/editor_node.cpp msgid "Exit the editor?" -msgstr "Kilépés a szerkesztÅ‘bÅ‘l?" +msgstr "Kilép a szerkesztÅ‘bÅ‘l?" #: editor/editor_node.cpp msgid "Open Project Manager?" @@ -2560,11 +2459,12 @@ msgstr "Megnyitja a ProjektkezelÅ‘t?" #: editor/editor_node.cpp msgid "Save & Quit" -msgstr "Mentés és Kilépés" +msgstr "Mentés és kilépés" #: editor/editor_node.cpp msgid "Save changes to the following scene(s) before quitting?" -msgstr "Elmenti a következÅ‘ Scene(ek)en végzett változtatásokat kilépés elÅ‘tt?" +msgstr "" +"Elmenti a következÅ‘ jelenet(ek)en végzett változtatásokat kilépés elÅ‘tt?" #: editor/editor_node.cpp msgid "Save changes the following scene(s) before opening Project Manager?" @@ -2577,8 +2477,8 @@ msgid "" "This option is deprecated. Situations where refresh must be forced are now " "considered a bug. Please report." msgstr "" -"Ez a lehetÅ‘ség elavult. Az olyan helyzeteket, ahol ki kell kényszerÃteni egy " -"frissÃtést, már hibának vesszük. Kérjük, jelentse a helyzetet." +"Ez a lehetÅ‘ség elavult. Az olyan helyzeteket, ahol kényszerÃteni kell egy " +"frissÃtést, már hibának vesszük. Kérjük, jelentse ezt." #: editor/editor_node.cpp msgid "Pick a Main Scene" @@ -2586,12 +2486,11 @@ msgstr "Válasszon egy FÅ‘ Jelenetet" #: editor/editor_node.cpp msgid "Close Scene" -msgstr "Scene bezárás" +msgstr "Jelenet bezárása" #: editor/editor_node.cpp -#, fuzzy msgid "Reopen Closed Scene" -msgstr "Scene bezárás" +msgstr "Bezárt jelenet újbóli megnyitása" #: editor/editor_node.cpp msgid "Unable to enable addon plugin at: '%s' parsing of config failed." @@ -2610,13 +2509,12 @@ msgid "Unable to load addon script from path: '%s'." msgstr "Nem sikerült az addon szkript betöltése a következÅ‘ útvonalról: '%s'." #: editor/editor_node.cpp -#, fuzzy msgid "" "Unable to load addon script from path: '%s' There seems to be an error in " "the code, please check the syntax." msgstr "" -"Nem sikerült az addon szkript betöltése a következÅ‘ útvonalról: '%s' A " -"szkript nem eszközmódban van." +"Nem lehet betölteni az addon szkriptet a(z) '%s' útvonalról. Úgy tűnik, hiba " +"történt a kódban, ellenÅ‘rizze a szintaxist." #: editor/editor_node.cpp msgid "" @@ -2702,24 +2600,20 @@ msgstr "Alapértelmezett" #: editor/editor_node.cpp editor/editor_properties.cpp #: editor/plugins/script_editor_plugin.cpp editor/property_editor.cpp -#, fuzzy msgid "Show in FileSystem" -msgstr "Mutassa a Fájlrendszerben" +msgstr "MegjelenÃtés a fájlrendszerben" #: editor/editor_node.cpp -#, fuzzy msgid "Play This Scene" -msgstr "Scene futtatás" +msgstr "Jelenet lejátszása" #: editor/editor_node.cpp -#, fuzzy msgid "Close Tab" -msgstr "A Többi Lap Bezárása" +msgstr "Lap bezárása" #: editor/editor_node.cpp -#, fuzzy msgid "Undo Close Tab" -msgstr "A Többi Lap Bezárása" +msgstr "Lap bezárásának visszavonása" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp msgid "Close Other Tabs" @@ -2727,12 +2621,11 @@ msgstr "A Többi Lap Bezárása" #: editor/editor_node.cpp msgid "Close Tabs to the Right" -msgstr "" +msgstr "Lapok bezárása ettÅ‘l jobbra" #: editor/editor_node.cpp -#, fuzzy msgid "Close All Tabs" -msgstr "Mind Bezárása" +msgstr "Minden lap bezárása" #: editor/editor_node.cpp msgid "Switch Scene Tab" @@ -2775,9 +2668,8 @@ msgid "Go to previously opened scene." msgstr "Ugrás az elÅ‘zÅ‘leg megnyitott jelenetre." #: editor/editor_node.cpp -#, fuzzy msgid "Copy Text" -msgstr "Útvonal másolása" +msgstr "Szöveg másolása" #: editor/editor_node.cpp msgid "Next tab" @@ -2785,7 +2677,7 @@ msgstr "KövetkezÅ‘ fül" #: editor/editor_node.cpp msgid "Previous tab" -msgstr "ElÅ‘zÅ‘ fül" +msgstr "ElÅ‘zÅ‘ lap" #: editor/editor_node.cpp msgid "Filter Files..." @@ -2816,9 +2708,8 @@ msgid "Save Scene" msgstr "Scene mentés" #: editor/editor_node.cpp -#, fuzzy msgid "Save All Scenes" -msgstr "Minden Scene mentés" +msgstr "Az összes jelenet mentése" #: editor/editor_node.cpp msgid "Convert To..." @@ -2852,49 +2743,44 @@ msgid "Project" msgstr "Projekt" #: editor/editor_node.cpp -#, fuzzy msgid "Project Settings..." -msgstr "Projekt BeállÃtások" +msgstr "Projekt beállÃtások..." #: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Version Control" -msgstr "Verzió:" +msgstr "Verziókezelés" #: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp msgid "Set Up Version Control" -msgstr "" +msgstr "Verziókezelés beállÃtása" #: editor/editor_node.cpp msgid "Shut Down Version Control" -msgstr "" +msgstr "VerzióvezérlÅ‘ leállÃtása" #: editor/editor_node.cpp -#, fuzzy msgid "Export..." -msgstr "Exportálás" +msgstr "Exportálás..." #: editor/editor_node.cpp msgid "Install Android Build Template..." msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Open Project Data Folder" -msgstr "Megnyitja a ProjektkezelÅ‘t?" +msgstr "Projektadat-mappa megnyitása" #: editor/editor_node.cpp editor/plugins/tile_set_editor_plugin.cpp msgid "Tools" msgstr "Eszközök" #: editor/editor_node.cpp -#, fuzzy msgid "Orphan Resource Explorer..." -msgstr "Ãrva Forrás KezelÅ‘" +msgstr "Ãrva erÅ‘forrás-kezelÅ‘..." #: editor/editor_node.cpp msgid "Quit to Project List" -msgstr "Kilépés a Projektlistába" +msgstr "Kilépés a projektlistába" #: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp #: editor/project_export.cpp @@ -2907,24 +2793,28 @@ msgstr "IndÃtás Távoli Teszteléssel" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Exportáláskor vagy telepÃtéskor az Ãgy kapott futtatható program megpróbál " -"ennek a számÃtógépnek az IP-jéhez csatlakozni távoli hibakeresés érdekében." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Kis TelepÃtés Hálózati FS-sel" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Ha ez az opció engedélyezve van, akkor az exportálás vagy a telepÃtés egy " "minimális méretű futtatható programot hoz létre.\n" @@ -2938,9 +2828,10 @@ msgid "Visible Collision Shapes" msgstr "Látható Ãœtközési Alakzatok" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Az ütközési alakzatok és a fénysugárkövetÅ‘ Node-ok (mind 2D-hez és 3D-hez) " "láthatóak lesznek a játék futásakor, ha ez az opció be van kapcsolva." @@ -2950,23 +2841,26 @@ msgid "Visible Navigation" msgstr "Látható Navigáció" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "A navigációs hálók és sokszögek láthatóak lesznek a játék futásakor, ha ez " "az opció be van kapcsolva." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Jelenet változtatások szinkronizálása" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Ha ez a beállÃtás be van kapcsolva, bármilyen változtatás a jeleneten a " "szerkesztÅ‘ben le lesz másolva a futó játékba.\n" @@ -2974,15 +2868,17 @@ msgstr "" "fájlrendszerrel együtt." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Szkript Változtatások Szinkronizálása" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Ha ez a beállÃtás be van kapcsolva, bármilyen szkript, amit elment, újra " "betöltÅ‘dik a futó játékba.\n" @@ -2994,56 +2890,49 @@ msgid "Editor" msgstr "SzerkesztÅ‘" #: editor/editor_node.cpp -#, fuzzy msgid "Editor Settings..." -msgstr "SzerkesztÅ‘ BeállÃtások" +msgstr "SzerkesztÅ‘ beállÃtásai..." #: editor/editor_node.cpp msgid "Editor Layout" msgstr "SzerkesztÅ‘ Elrendezés" #: editor/editor_node.cpp -#, fuzzy msgid "Take Screenshot" -msgstr "Scene mentés" +msgstr "KépernyÅ‘kép készÃtése" #: editor/editor_node.cpp -#, fuzzy msgid "Screenshots are stored in the Editor Data/Settings Folder." -msgstr "SzerkesztÅ‘ BeállÃtások" +msgstr "A képernyÅ‘képek a szerkesztÅ‘ adatai/beállÃtásai mappában tárolódnak." #: editor/editor_node.cpp msgid "Toggle Fullscreen" msgstr "Teljes KépernyÅ‘" #: editor/editor_node.cpp -#, fuzzy msgid "Toggle System Console" -msgstr "Mód Váltása" +msgstr "Rendszerkonzol be- és kikapcsolása" #: editor/editor_node.cpp -#, fuzzy msgid "Open Editor Data/Settings Folder" -msgstr "SzerkesztÅ‘ BeállÃtások" +msgstr "SzerkesztÅ‘ adatok/beállÃtások mappa megnyitása" #: editor/editor_node.cpp +#, fuzzy msgid "Open Editor Data Folder" -msgstr "" +msgstr "A szerkesztÅ‘ adatmappájának megnyitása" #: editor/editor_node.cpp -#, fuzzy msgid "Open Editor Settings Folder" -msgstr "SzerkesztÅ‘ BeállÃtások" +msgstr "SzerkesztÅ‘ beállÃtásai mappa megnyitása" #: editor/editor_node.cpp -#, fuzzy msgid "Manage Editor Features..." -msgstr "Export Sablonok Kezelése" +msgstr "A SzerkesztÅ‘ funkcióinak kezelése ..." #: editor/editor_node.cpp -#, fuzzy msgid "Manage Export Templates..." -msgstr "Export Sablonok Kezelése" +msgstr "Exportálási sablonok kezelése..." #: editor/editor_node.cpp editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3054,7 +2943,7 @@ msgstr "Súgó" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Keresés" @@ -3065,16 +2954,16 @@ msgstr "Online Dokumentáció" #: editor/editor_node.cpp msgid "Q&A" -msgstr "Kérdések és Válaszok" +msgstr "Kérdések és válaszok" #: editor/editor_node.cpp -#, fuzzy msgid "Report a Bug" -msgstr "Újraimportálás" +msgstr "Hiba bejelentése" #: editor/editor_node.cpp +#, fuzzy msgid "Send Docs Feedback" -msgstr "" +msgstr "Visszajelzés a Dokumentumokról" #: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp msgid "Community" @@ -3094,11 +2983,11 @@ msgstr "Játék" #: editor/editor_node.cpp msgid "Pause the scene execution for debugging." -msgstr "" +msgstr "Szüneteltesse a jelenet végrehajtását a hibakereséshez." #: editor/editor_node.cpp msgid "Pause Scene" -msgstr "Scene szüneteltetés" +msgstr "Jelenet szüneteltetése" #: editor/editor_node.cpp msgid "Stop the scene." @@ -3118,37 +3007,33 @@ msgstr "TetszÅ‘leges Scene futtatás" #: editor/editor_node.cpp msgid "Play Custom Scene" -msgstr "TetszÅ‘leges Scene futtatás" +msgstr "TetszÅ‘leges jelenet lejátszása" #: editor/editor_node.cpp msgid "Changing the video driver requires restarting the editor." msgstr "" +"A videó-illesztÅ‘program módosÃtásához újra kell indÃtani a szerkesztÅ‘t." #: editor/editor_node.cpp editor/project_settings_editor.cpp #: editor/settings_config_dialog.cpp -#, fuzzy msgid "Save & Restart" -msgstr "Mentés és Kilépés" +msgstr "Mentés és újraindÃtás" #: editor/editor_node.cpp -#, fuzzy msgid "Spins when the editor window redraws." -msgstr "Fordul egyet, amikor a szerkesztÅ‘ablak újrarajzolódik!" +msgstr "Pörög, amikor a szerkesztÅ‘ablak újrarajzolódik." #: editor/editor_node.cpp -#, fuzzy msgid "Update Continuously" -msgstr "Folyamatos" +msgstr "Folyamatos frissÃtés" #: editor/editor_node.cpp -#, fuzzy msgid "Update When Changed" -msgstr "Változások FrissÃtése" +msgstr "FrissÃtés, ha megváltozik" #: editor/editor_node.cpp -#, fuzzy msgid "Hide Update Spinner" -msgstr "FrissÃtési Forgó Kikapcsolása" +msgstr "FrissÃtési forgó elrejtése" #: editor/editor_node.cpp msgid "FileSystem" @@ -3159,9 +3044,8 @@ msgid "Inspector" msgstr "MegfigyelÅ‘" #: editor/editor_node.cpp -#, fuzzy msgid "Expand Bottom Panel" -msgstr "Összes kibontása" +msgstr "Alsó panel kinyitása" #: editor/editor_node.cpp msgid "Output" @@ -3176,9 +3060,8 @@ msgid "Android build template is missing, please install relevant templates." msgstr "" #: editor/editor_node.cpp -#, fuzzy msgid "Manage Templates" -msgstr "Export Sablonok Kezelése" +msgstr "Sablonok kezelése" #: editor/editor_node.cpp msgid "" @@ -3204,9 +3087,8 @@ msgid "Import Templates From ZIP File" msgstr "Sablonok Importálása ZIP Fájlból" #: editor/editor_node.cpp -#, fuzzy msgid "Template Package" -msgstr "Export Sablon KezelÅ‘" +msgstr "Sabloncsomag" #: editor/editor_node.cpp msgid "Export Library" @@ -3234,7 +3116,7 @@ msgstr "Kiválaszt" #: editor/editor_node.cpp msgid "Open 2D Editor" -msgstr "2D SzerkesztÅ‘ Megnyitása" +msgstr "2D szerkesztÅ‘ megnyitása" #: editor/editor_node.cpp msgid "Open 3D Editor" @@ -3242,7 +3124,7 @@ msgstr "3D SzerkesztÅ‘ Megnyitása" #: editor/editor_node.cpp msgid "Open Script Editor" -msgstr "Szkript SzerkesztÅ‘ Megnyitása" +msgstr "Szkript szerkesztÅ‘ megnyitása" #: editor/editor_node.cpp editor/project_manager.cpp msgid "Open Asset Library" @@ -3258,12 +3140,11 @@ msgstr "ElÅ‘zÅ‘ SzerkesztÅ‘ Megnyitása" #: editor/editor_node.h msgid "Warning!" -msgstr "" +msgstr "Figyelmeztetés!" #: editor/editor_path.cpp -#, fuzzy msgid "No sub-resources found." -msgstr "Nincs felületi forrás meghatározva." +msgstr "Nem található alerÅ‘forrás." #: editor/editor_plugin.cpp msgid "Creating Mesh Previews" @@ -3274,14 +3155,12 @@ msgid "Thumbnail..." msgstr "Indexkép..." #: editor/editor_plugin_settings.cpp -#, fuzzy msgid "Main Script:" -msgstr "Szkript Futtatása" +msgstr "FÅ‘ szkript:" #: editor/editor_plugin_settings.cpp -#, fuzzy msgid "Edit Plugin" -msgstr "Sokszög Szerkesztése" +msgstr "BÅ‘vÃtmény szerkesztése" #: editor/editor_plugin_settings.cpp msgid "Installed Plugins:" @@ -3305,9 +3184,8 @@ msgid "Status:" msgstr "Ãllapot:" #: editor/editor_plugin_settings.cpp -#, fuzzy msgid "Edit:" -msgstr "Szerkesztés" +msgstr "Szerkesztés:" #: editor/editor_profiler.cpp msgid "Measure:" @@ -3350,34 +3228,32 @@ msgid "Calls" msgstr "HÃvások" #: editor/editor_properties.cpp -#, fuzzy msgid "Edit Text:" -msgstr "Tagok" +msgstr "Szöveg szerkesztése:" #: editor/editor_properties.cpp editor/script_create_dialog.cpp msgid "On" -msgstr "" +msgstr "Be" #: editor/editor_properties.cpp msgid "Layer" -msgstr "" +msgstr "Réteg" #: editor/editor_properties.cpp msgid "Bit %d, value %d" -msgstr "" +msgstr "%d bit, érték: %d" #: editor/editor_properties.cpp msgid "[Empty]" -msgstr "" +msgstr "[Ãœres]" #: editor/editor_properties.cpp editor/plugins/root_motion_editor_plugin.cpp msgid "Assign..." -msgstr "" +msgstr "Hozzárendelés..." #: editor/editor_properties.cpp -#, fuzzy msgid "Invalid RID" -msgstr "Érvénytelen név." +msgstr "" #: editor/editor_properties.cpp msgid "" @@ -3405,20 +3281,19 @@ msgstr "" #: editor/editor_properties.cpp editor/property_editor.cpp msgid "New Script" -msgstr "" +msgstr "Új szkript" #: editor/editor_properties.cpp editor/scene_tree_dock.cpp -#, fuzzy msgid "Extend Script" -msgstr "Szkript Futtatása" +msgstr "Szkript kinyitása" #: editor/editor_properties.cpp editor/property_editor.cpp msgid "New %s" -msgstr "" +msgstr "Új %s" #: editor/editor_properties.cpp editor/property_editor.cpp msgid "Make Unique" -msgstr "" +msgstr "Egyedivé tétel" #: editor/editor_properties.cpp #: editor/plugins/animation_blend_space_1d_editor.cpp @@ -3436,7 +3311,7 @@ msgstr "Beillesztés" #: editor/editor_properties.cpp editor/property_editor.cpp msgid "Convert To %s" -msgstr "" +msgstr "ÃtalakÃtás erre: %s" #: editor/editor_properties.cpp editor/property_editor.cpp msgid "Selected node is not a Viewport!" @@ -3444,35 +3319,35 @@ msgstr "" #: editor/editor_properties_array_dict.cpp msgid "Size: " -msgstr "" +msgstr "Méret: " #: editor/editor_properties_array_dict.cpp msgid "Page: " -msgstr "" +msgstr "Oldal: " #: editor/editor_properties_array_dict.cpp #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Item" -msgstr "" +msgstr "Elem eltávolÃtása" #: editor/editor_properties_array_dict.cpp -#, fuzzy msgid "New Key:" -msgstr "Új név:" +msgstr "Új kulcs:" #: editor/editor_properties_array_dict.cpp -#, fuzzy msgid "New Value:" -msgstr "Új név:" +msgstr "Új érték:" #: editor/editor_properties_array_dict.cpp msgid "Add Key/Value Pair" -msgstr "" +msgstr "Kulcs/érték pár hozzáadása" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Nem található futtatható exportállomány ehhez a platformhoz.\n" "Adjon hozzá egy futtatható exportállományt az export menüben." @@ -3511,7 +3386,7 @@ msgstr "Válassza ki az importálandó Node-okat" #: editor/editor_sub_scene.cpp editor/project_manager.cpp msgid "Browse" -msgstr "" +msgstr "Tallózás" #: editor/editor_sub_scene.cpp msgid "Scene Path:" @@ -3522,9 +3397,8 @@ msgid "Import From Node:" msgstr "Importálás Node-ból:" #: editor/export_template_manager.cpp -#, fuzzy msgid "Redownload" -msgstr "Letöltés Megint" +msgstr "Letöltés újra" #: editor/export_template_manager.cpp msgid "Uninstall" @@ -3564,9 +3438,8 @@ msgid "Can't open export templates zip." msgstr "Nem nyitható meg az export sablon zip." #: editor/export_template_manager.cpp -#, fuzzy msgid "Invalid version.txt format inside templates: %s." -msgstr "Érvénytelen version.txt formátum a sablonokban." +msgstr "Érvénytelen version.txt formátum a sablonokban: %s." #: editor/export_template_manager.cpp msgid "No version.txt found inside templates." @@ -3586,11 +3459,12 @@ msgstr "Importálás:" #: editor/export_template_manager.cpp msgid "Error getting the list of mirrors." -msgstr "" +msgstr "Hiba történt a tükörlista lekérésekor." #: editor/export_template_manager.cpp msgid "Error parsing JSON of mirror list. Please report this issue!" msgstr "" +"Hiba történt a tükörlista JSON elemzésénél. Kérjük, jelentse ezt a problémát!" #: editor/export_template_manager.cpp msgid "" @@ -3617,7 +3491,7 @@ msgstr "Nincs válasz." #: editor/export_template_manager.cpp msgid "Request Failed." -msgstr "Kérés Sikertelen." +msgstr "A kérés sikertelen." #: editor/export_template_manager.cpp msgid "Redirect Loop." @@ -3633,20 +3507,21 @@ msgid "Download Complete." msgstr "A Letöltés BefejezÅ‘dött." #: editor/export_template_manager.cpp -#, fuzzy msgid "Cannot remove temporary file:" -msgstr "Nem eltávolÃtható:" +msgstr "Az ideiglenes fájl nem távolÃtható el:" #: editor/export_template_manager.cpp +#, fuzzy msgid "" "Templates installation failed.\n" "The problematic templates archives can be found at '%s'." msgstr "" +"A sablonok telepÃtése nem sikerült.\n" +"A problémás sablonok archÃvuma megtalálható a következÅ‘ helyen: '%s'." #: editor/export_template_manager.cpp -#, fuzzy msgid "Error requesting URL:" -msgstr "Hiba történt az url lekérdezésekor: " +msgstr "Hiba az URL kérésekor:" #: editor/export_template_manager.cpp msgid "Connecting to Mirror..." @@ -3695,9 +3570,8 @@ msgid "SSL Handshake Error" msgstr "SSL-Kézfogás Hiba" #: editor/export_template_manager.cpp -#, fuzzy msgid "Uncompressing Android Build Sources" -msgstr "Eszközök Kicsomagolása" +msgstr "" #: editor/export_template_manager.cpp msgid "Current Version:" @@ -3716,14 +3590,12 @@ msgid "Remove Template" msgstr "Sablon EltávolÃtása" #: editor/export_template_manager.cpp -#, fuzzy msgid "Select Template File" msgstr "Válasszon sablonfájlt" #: editor/export_template_manager.cpp -#, fuzzy msgid "Godot Export Templates" -msgstr "Export Sablonok Kezelése" +msgstr "Godot export sablonok" #: editor/export_template_manager.cpp msgid "Export Template Manager" @@ -3734,14 +3606,13 @@ msgid "Download Templates" msgstr "Sablonok Letöltése" #: editor/export_template_manager.cpp -#, fuzzy msgid "Select mirror from list: (Shift+Click: Open in Browser)" -msgstr "Válasszon tükröt a listából: " +msgstr "" +"Tükör kiválasztása a listából: (Shift + kattintás: megnyitás a böngészÅ‘ben)" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Favorites" -msgstr "Kedvencek:" +msgstr "Kedvencek" #: editor/filesystem_dock.cpp msgid "Status: Import of file failed. Please fix file and reimport manually." @@ -3774,9 +3645,8 @@ msgid "No name provided." msgstr "Nincs név megadva." #: editor/filesystem_dock.cpp -#, fuzzy msgid "Provided name contains invalid characters." -msgstr "A megadott név érvénytelen karaktereket tartalmaz" +msgstr "A megadott név érvénytelen karaktereket tartalmaz." #: editor/filesystem_dock.cpp msgid "A file or folder with this name already exists." @@ -3803,33 +3673,28 @@ msgid "Duplicating folder:" msgstr "Mappa másolása:" #: editor/filesystem_dock.cpp -#, fuzzy msgid "New Inherited Scene" -msgstr "Új örökölt Jelenet..." +msgstr "Új örökölt Jelenet" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Set As Main Scene" -msgstr "Válasszon egy FÅ‘ Jelenetet" +msgstr "BeállÃtás fÅ‘ jelenetként" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Open Scenes" -msgstr "Scene megnyitás" +msgstr "Jelenetek megnyitása" #: editor/filesystem_dock.cpp msgid "Instance" msgstr "Példány" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Add to Favorites" -msgstr "Kedvencek:" +msgstr "Hozzáadás kedvencekhez" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Remove from Favorites" -msgstr "EltávolÃtás Csoportból" +msgstr "EltávolÃtás a kedvencek közül" #: editor/filesystem_dock.cpp msgid "Edit Dependencies..." @@ -3852,31 +3717,26 @@ msgid "Move To..." msgstr "Ãthelyezés..." #: editor/filesystem_dock.cpp -#, fuzzy msgid "New Scene..." -msgstr "Új Scene" +msgstr "Új jelenet..." #: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "New Script..." -msgstr "Szkript gyors megnyitás..." +msgstr "Új szkript..." #: editor/filesystem_dock.cpp -#, fuzzy msgid "New Resource..." -msgstr "ErÅ‘forrás Mentése Másként..." +msgstr "Új erÅ‘forrás..." #: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Expand All" -msgstr "Összes kibontása" +msgstr "Összes kinyitása" #: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Collapse All" -msgstr "Összes összecsukása" +msgstr "Összes becsukása" #: editor/filesystem_dock.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp @@ -3886,78 +3746,68 @@ msgid "Rename" msgstr "Ãtnevezés" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Previous Folder/File" -msgstr "ElÅ‘zÅ‘ SÃk" +msgstr "ElÅ‘zÅ‘ mappa/fájl" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Next Folder/File" -msgstr "Mappa Létrehozása" +msgstr "KövetkezÅ‘ mappa/fájl" #: editor/filesystem_dock.cpp msgid "Re-Scan Filesystem" msgstr "Fájlrendszer Újra-vizsgálata" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Toggle Split Mode" -msgstr "Mód Váltása" +msgstr "Váltás az osztott módra" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Search files" -msgstr "Osztályok Keresése" +msgstr "Fájlok keresése" #: editor/filesystem_dock.cpp msgid "" "Scanning Files,\n" "Please Wait..." msgstr "" -"Fájlok Vizsgálata,\n" -"Kérem Várjon..." +"Fájlok vizsgálata,\n" +"kérjük várjon..." #: editor/filesystem_dock.cpp msgid "Move" msgstr "Ãthelyezés" #: editor/filesystem_dock.cpp -#, fuzzy msgid "There is already file or folder with the same name in this location." -msgstr "Egy fájl vagy mappa már létezik a megadott névvel." +msgstr "Ezen a helyen már van azonos nevű fájl vagy mappa." #: editor/filesystem_dock.cpp msgid "Overwrite" -msgstr "" +msgstr "FelülÃrás" #: editor/filesystem_dock.cpp -#, fuzzy msgid "Create Scene" -msgstr "Scene mentés" +msgstr "Jelenet létrehozása" #: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp msgid "Create Script" msgstr "Szkript Létrehozása" #: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Find in Files" -msgstr "%d további fájl" +msgstr "Keresés a fájlokban" #: editor/find_in_files.cpp -#, fuzzy msgid "Find:" -msgstr "Keres" +msgstr "Keres:" #: editor/find_in_files.cpp -#, fuzzy msgid "Folder:" -msgstr "Mappa Létrehozása" +msgstr "Mappa:" #: editor/find_in_files.cpp -#, fuzzy msgid "Filters:" -msgstr "SzűrÅ‘k..." +msgstr "SzűrÅ‘k:" #: editor/find_in_files.cpp msgid "" @@ -3979,29 +3829,24 @@ msgid "Cancel" msgstr "Mégse" #: editor/find_in_files.cpp -#, fuzzy msgid "Find: " -msgstr "Keres" +msgstr "Keres: " #: editor/find_in_files.cpp -#, fuzzy msgid "Replace: " -msgstr "Lecserélés" +msgstr "Csere: " #: editor/find_in_files.cpp -#, fuzzy msgid "Replace all (no undo)" -msgstr "Mind Lecserélése" +msgstr "Összes lecserélése (nem visszavonható)" #: editor/find_in_files.cpp -#, fuzzy msgid "Searching..." -msgstr "Mentés..." +msgstr "Keresés…" #: editor/find_in_files.cpp -#, fuzzy msgid "Search complete" -msgstr "Keresés a Szövegben" +msgstr "A keresés kész" #: editor/groups_editor.cpp msgid "Add to Group" @@ -4012,57 +3857,49 @@ msgid "Remove from Group" msgstr "EltávolÃtás Csoportból" #: editor/groups_editor.cpp -#, fuzzy msgid "Group name already exists." -msgstr "HIBA: Animáció név már létezik!" +msgstr "A csoportnév már létezik." #: editor/groups_editor.cpp -#, fuzzy msgid "Invalid group name." -msgstr "Érvénytelen név." +msgstr "Érvénytelen csoportnév." #: editor/groups_editor.cpp -#, fuzzy msgid "Rename Group" -msgstr "Csoportok" +msgstr "Csoport átnevezése" #: editor/groups_editor.cpp -#, fuzzy msgid "Delete Group" -msgstr "Elrendezés Törlése" +msgstr "Csoport törlése" #: editor/groups_editor.cpp editor/node_dock.cpp msgid "Groups" msgstr "Csoportok" #: editor/groups_editor.cpp -#, fuzzy msgid "Nodes Not in Group" -msgstr "Hozzáadás Csoporthoz" +msgstr "Csoportban nem lévÅ‘ node-ok" #: editor/groups_editor.cpp editor/scene_tree_dock.cpp #: editor/scene_tree_editor.cpp msgid "Filter nodes" -msgstr "" +msgstr "Node-ok szűrése" #: editor/groups_editor.cpp -#, fuzzy msgid "Nodes in Group" -msgstr "Hozzáadás Csoporthoz" +msgstr "Node-ok a csoportban" #: editor/groups_editor.cpp msgid "Empty groups will be automatically removed." -msgstr "" +msgstr "Az üres csoportok automatikusan törlÅ‘dnek." #: editor/groups_editor.cpp -#, fuzzy msgid "Group Editor" -msgstr "Szkript SzerkesztÅ‘ Megnyitása" +msgstr "CsoportszerkesztÅ‘" #: editor/groups_editor.cpp -#, fuzzy msgid "Manage Groups" -msgstr "Csoportok" +msgstr "Csoportok kezelése" #: editor/import/resource_importer_scene.cpp msgid "Import as Single Scene" @@ -4147,9 +3984,8 @@ msgid "Saving..." msgstr "Mentés..." #: editor/import_dock.cpp -#, fuzzy msgid "%d Files" -msgstr " Fájlok" +msgstr "%d fájl" #: editor/import_dock.cpp msgid "Set as Default for '%s'" @@ -4164,9 +4000,8 @@ msgid "Import As:" msgstr "Importálás Mint:" #: editor/import_dock.cpp -#, fuzzy msgid "Preset" -msgstr "BeépÃtett BeállÃtások..." +msgstr "ElÅ‘re beállÃtott" #: editor/import_dock.cpp msgid "Reimport" @@ -4174,30 +4009,32 @@ msgstr "Újraimportálás" #: editor/import_dock.cpp msgid "Save Scenes, Re-Import, and Restart" -msgstr "" +msgstr "Jelenetek mentése, újraimportálás és újraindÃtás" #: editor/import_dock.cpp msgid "Changing the type of an imported file requires editor restart." msgstr "" +"Az importált fájl tÃpusának módosÃtásához a szerkesztÅ‘t újra kell indÃtani." #: editor/import_dock.cpp +#, fuzzy msgid "" "WARNING: Assets exist that use this resource, they may stop loading properly." msgstr "" +"FIGYELMEZTETÉS: Vannak olyan eszközök, amelyek ezt az erÅ‘forrást használják, " +"ezért leállÃthatják a megfelelÅ‘ betöltést." #: editor/inspector_dock.cpp msgid "Failed to load resource." msgstr "Nem sikerült betölteni az erÅ‘forrást." #: editor/inspector_dock.cpp -#, fuzzy msgid "Expand All Properties" -msgstr "Összes tulajdonság kibontása" +msgstr "Összes tulajdonság kinyitása" #: editor/inspector_dock.cpp -#, fuzzy msgid "Collapse All Properties" -msgstr "Összes tulajdonság összecsukása" +msgstr "Összes tulajdonság becsukása" #: editor/inspector_dock.cpp editor/plugins/animation_player_editor_plugin.cpp #: editor/plugins/script_editor_plugin.cpp @@ -4209,9 +4046,8 @@ msgid "Copy Params" msgstr "Paraméterek Másolása" #: editor/inspector_dock.cpp -#, fuzzy msgid "Edit Resource Clipboard" -msgstr "Az erÅ‘forrás vágólap üres!" +msgstr "ErÅ‘forrás vágólap szerkesztése" #: editor/inspector_dock.cpp msgid "Copy Resource" @@ -4258,9 +4094,8 @@ msgid "Object properties." msgstr "Objektumtulajdonságok." #: editor/inspector_dock.cpp -#, fuzzy msgid "Filter properties" -msgstr "Objektumtulajdonságok." +msgstr "Tulajdonságok szűrése" #: editor/inspector_dock.cpp msgid "Changes may be lost!" @@ -4271,53 +4106,47 @@ msgid "MultiNode Set" msgstr "MultiNode BeállÃtás" #: editor/node_dock.cpp -#, fuzzy msgid "Select a single node to edit its signals and groups." -msgstr "Válasszon ki egy Node-ot a Jelzések és Csoportok módosÃtásához." +msgstr "Válasszon ki egy node-ot a jelzések és csoportok módosÃtásához." #: editor/plugin_config_dialog.cpp -#, fuzzy msgid "Edit a Plugin" -msgstr "Sokszög Szerkesztése" +msgstr "BÅ‘vÃtmény szerkesztése" #: editor/plugin_config_dialog.cpp -#, fuzzy msgid "Create a Plugin" -msgstr "Sokszög Létrehozása" +msgstr "BÅ‘vÃtmény létrehozása" #: editor/plugin_config_dialog.cpp -#, fuzzy msgid "Plugin Name:" -msgstr "BÅ‘vÃtmények" +msgstr "BÅ‘vÃtmény neve:" #: editor/plugin_config_dialog.cpp msgid "Subfolder:" -msgstr "" +msgstr "Almappa:" #: editor/plugin_config_dialog.cpp editor/script_create_dialog.cpp msgid "Language:" -msgstr "" +msgstr "Nyelv:" #: editor/plugin_config_dialog.cpp msgid "Script Name:" -msgstr "" +msgstr "Szkript neve:" #: editor/plugin_config_dialog.cpp msgid "Activate now?" -msgstr "" +msgstr "Aktiválja most?" #: editor/plugins/abstract_polygon_2d_editor.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Create Polygon" -msgstr "Sokszög Létrehozása" +msgstr "Sokszög létrehozása" #: editor/plugins/abstract_polygon_2d_editor.cpp #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Create points." -msgstr "Pontok Törlése" +msgstr "Pontok létrehozása." #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "" @@ -4331,28 +4160,24 @@ msgstr "" #: editor/plugins/abstract_polygon_2d_editor.cpp #: editor/plugins/animation_blend_space_1d_editor.cpp -#, fuzzy msgid "Erase points." -msgstr "Jobb Egérgomb: Pont Törlése." +msgstr "Pontok törlése." #: editor/plugins/abstract_polygon_2d_editor.cpp -#, fuzzy msgid "Edit Polygon" -msgstr "Sokszög Szerkesztése" +msgstr "Sokszög szerkesztése" #: editor/plugins/abstract_polygon_2d_editor.cpp msgid "Insert Point" msgstr "Pont Beszúrása" #: editor/plugins/abstract_polygon_2d_editor.cpp -#, fuzzy msgid "Edit Polygon (Remove Point)" -msgstr "Sokszög Szerkesztése (Pont EltávolÃtása)" +msgstr "Sokszög szerkesztése (pont eltávolÃtása)" #: editor/plugins/abstract_polygon_2d_editor.cpp -#, fuzzy msgid "Remove Polygon And Point" -msgstr "Sokszög és Pont EltávolÃtása" +msgstr "Sokszög és pont eltávolÃtása" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4366,25 +4191,21 @@ msgstr "Animáció Hozzáadása" #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Load..." -msgstr "Betöltés" +msgstr "Betöltés..." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Move Node Point" -msgstr "Pont Mozgatása" +msgstr "" #: editor/plugins/animation_blend_space_1d_editor.cpp -#, fuzzy msgid "Change BlendSpace1D Limits" -msgstr "Keverési IdÅ‘ MódosÃtása" +msgstr "" #: editor/plugins/animation_blend_space_1d_editor.cpp -#, fuzzy msgid "Change BlendSpace1D Labels" -msgstr "Keverési IdÅ‘ MódosÃtása" +msgstr "" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp @@ -4394,20 +4215,17 @@ msgstr "" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Add Node Point" -msgstr "Pont hozzáadása" +msgstr "" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Add Animation Point" -msgstr "Animáció Hozzáadása" +msgstr "" #: editor/plugins/animation_blend_space_1d_editor.cpp -#, fuzzy msgid "Remove BlendSpace1D Point" -msgstr "Útvonal Pont EltávolÃtása" +msgstr "" #: editor/plugins/animation_blend_space_1d_editor.cpp msgid "Move BlendSpace1D Node Point" @@ -4435,53 +4253,45 @@ msgstr "" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp scene/gui/graph_edit.cpp msgid "Enable snap and show grid." -msgstr "" +msgstr "Illesztés engedélyezése és rács megjelenÃtése." #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Point" -msgstr "Pont Mozgatása" +msgstr "Pont" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Open Editor" -msgstr "Megnyitás SzerkesztÅ‘ben" +msgstr "SzerkesztÅ‘ megnyitása" #: editor/plugins/animation_blend_space_1d_editor.cpp #: editor/plugins/animation_blend_space_2d_editor.cpp #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Open Animation Node" -msgstr "Animáció Node" +msgstr "" #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Triangle already exists." -msgstr "HIBA: Animáció név már létezik!" +msgstr "A háromszög már létezik." #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Add Triangle" -msgstr "Animáció nyomvonal hozzáadás" +msgstr "Háromszög hozzáadása" #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Change BlendSpace2D Limits" -msgstr "Keverési IdÅ‘ MódosÃtása" +msgstr "" #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Change BlendSpace2D Labels" -msgstr "Keverési IdÅ‘ MódosÃtása" +msgstr "" #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Remove BlendSpace2D Point" -msgstr "Útvonal Pont EltávolÃtása" +msgstr "" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Remove BlendSpace2D Triangle" @@ -4492,13 +4302,13 @@ msgid "BlendSpace2D does not belong to an AnimationTree node." msgstr "" #: editor/plugins/animation_blend_space_2d_editor.cpp +#, fuzzy msgid "No triangles exist, so no blending can take place." -msgstr "" +msgstr "Nincsenek háromszögek, Ãgy nem történhet keverés." #: editor/plugins/animation_blend_space_2d_editor.cpp -#, fuzzy msgid "Toggle Auto Triangles" -msgstr "AutoLoad Globálisok Kapcsolása" +msgstr "Automatikus háromszögek be- és kikapcsolása" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Create triangles by connecting points." @@ -4506,7 +4316,7 @@ msgstr "" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Erase points and triangles." -msgstr "" +msgstr "Pontok és háromszögek törlése." #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Generate blend triangles automatically (instead of manually)" @@ -4518,9 +4328,8 @@ msgid "Blend:" msgstr "Keverés:" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Parameter Changed" -msgstr "Változások FrissÃtése" +msgstr "A paraméter megváltozott" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp @@ -4537,9 +4346,8 @@ msgstr "" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Node Moved" -msgstr "Mozgás Mód" +msgstr "" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Unable to connect, port may be in use or connection may be invalid." @@ -4547,41 +4355,35 @@ msgstr "" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Nodes Connected" -msgstr "Csatlakozva" +msgstr "" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Nodes Disconnected" -msgstr "Kapcsolat bontva" +msgstr "" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Set Animation" -msgstr "Animáció" +msgstr "Animáció beállÃtása" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Delete Node" -msgstr "Node létrehozás" +msgstr "Node törlése" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/scene_tree_dock.cpp msgid "Delete Node(s)" -msgstr "" +msgstr "Node(-ok) törlése" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Toggle Filter On/Off" -msgstr "Zavarmentes mód váltása." +msgstr "SzűrÅ‘ be- és kikapcsolása" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Change Filter" -msgstr "Animáció hossz változtatás" +msgstr "SzűrÅ‘ módosÃtása" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "No animation player set, so unable to retrieve track names." @@ -4600,39 +4402,34 @@ msgstr "" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Anim Clips" -msgstr "" +msgstr "Animáció klipek" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Audio Clips" -msgstr "Animáció nyomvonal hozzáadás" +msgstr "Audió klipek" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Functions" -msgstr "Funkciók:" +msgstr "Függvények" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Node Renamed" -msgstr "Node neve:" +msgstr "Node átnevezve" #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Add Node..." -msgstr "" +msgstr "Node hozzáadása..." #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/root_motion_editor_plugin.cpp -#, fuzzy msgid "Edit Filtered Tracks:" -msgstr "SzűrÅ‘k Szerkesztése" +msgstr "" #: editor/plugins/animation_blend_tree_editor_plugin.cpp -#, fuzzy msgid "Enable Filtering" -msgstr "Animáció hossz változtatás" +msgstr "Szűrés engedélyezése" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Toggle Autoplay" @@ -4661,14 +4458,12 @@ msgid "Remove Animation" msgstr "Animáció EltávolÃtása" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "Invalid animation name!" -msgstr "HIBA: Érvénytelen animáció név!" +msgstr "Érvénytelen animáció név!" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "Animation name already exists!" -msgstr "HIBA: Animáció név már létezik!" +msgstr "Az animáció név már létezik!" #: editor/plugins/animation_player_editor_plugin.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -4692,14 +4487,12 @@ msgid "Duplicate Animation" msgstr "Animáció MegkettÅ‘zése" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "No animation to copy!" -msgstr "HIBA: Nincs másolható animáció!" +msgstr "Nincs másolható animáció!" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "No animation resource on clipboard!" -msgstr "HIBA: Nincs animációs erÅ‘forrás a vágólapon!" +msgstr "Nincs animációs erÅ‘forrás a vágólapon!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Pasted Animation" @@ -4710,9 +4503,8 @@ msgid "Paste Animation" msgstr "Animáció Beillesztése" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "No animation to edit!" -msgstr "HIBA: Nincs animáció szerkesztésre!" +msgstr "Nincs animáció szerkesztésre!" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Play selected animation backwards from current pos. (A)" @@ -4752,14 +4544,12 @@ msgid "Animation" msgstr "Animáció" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "Edit Transitions..." -msgstr "Ãtmenetek" +msgstr "Ãtmenetek szerkesztése..." #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "Open in Inspector" -msgstr "Megnyitás SzerkesztÅ‘ben" +msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Display list of animations in player." @@ -4774,9 +4564,8 @@ msgid "Enable Onion Skinning" msgstr "MásolópapÃr Mód Bekapcsolása" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "Onion Skinning Options" -msgstr "MásolópapÃr Animáció (Onion Skinning)" +msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Directions" @@ -4819,9 +4608,8 @@ msgid "Include Gizmos (3D)" msgstr "Kihatás Gizmókra Is (3D)" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "Pin AnimationPlayer" -msgstr "Animáció Beillesztése" +msgstr "" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Create New Animation" @@ -4851,24 +4639,21 @@ msgid "Cross-Animation Blend Times" msgstr "Animációk Közötti Keverési IdÅ‘k" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Move Node" -msgstr "Mozgás Mód" +msgstr "Node áthelyezése" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Transition exists!" -msgstr "Ãtmenet" +msgstr "Az átmenet létezik!" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Add Transition" -msgstr "Ãtmenet" +msgstr "Ãtmenet hozzáadása" #: editor/plugins/animation_state_machine_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Add Node" -msgstr "" +msgstr "Node hozzáadása" #: editor/plugins/animation_state_machine_editor.cpp msgid "End" @@ -4876,42 +4661,39 @@ msgstr "" #: editor/plugins/animation_state_machine_editor.cpp msgid "Immediate" -msgstr "" +msgstr "Azonnal" #: editor/plugins/animation_state_machine_editor.cpp msgid "Sync" -msgstr "" +msgstr "Szinkronizálás" #: editor/plugins/animation_state_machine_editor.cpp msgid "At End" -msgstr "" +msgstr "A végén" #: editor/plugins/animation_state_machine_editor.cpp msgid "Travel" -msgstr "" +msgstr "Utazás" #: editor/plugins/animation_state_machine_editor.cpp msgid "Start and end nodes are needed for a sub-transition." msgstr "" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "No playback resource set at path: %s." -msgstr "Nincs az erÅ‘forrás elérési útban." +msgstr "" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Node Removed" -msgstr "EltávolÃt" +msgstr "Node eltávolÃtva" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Transition Removed" -msgstr "Ãtmenet Node" +msgstr "Ãtmenet eltávolÃtva" #: editor/plugins/animation_state_machine_editor.cpp msgid "Set Start Node (Autoplay)" -msgstr "" +msgstr "Start node beállÃtása (automatikus lejátszás)" #: editor/plugins/animation_state_machine_editor.cpp msgid "" @@ -4921,19 +4703,16 @@ msgid "" msgstr "" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Create new nodes." -msgstr "Új %s Létrehozása" +msgstr "Új node-ok létrehozása." #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Connect nodes." -msgstr "Csatlakoztatás Node-hoz:" +msgstr "Node-ok csatlakoztatása." #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Remove selected node or transition." -msgstr "Kiválasztott nyomvonal eltávolÃtása." +msgstr "Kiválasztott node vagy átmenet eltávolÃtása." #: editor/plugins/animation_state_machine_editor.cpp msgid "Toggle autoplay this animation on start, restart or seek to zero." @@ -4944,19 +4723,17 @@ msgid "Set the end animation. This is useful for sub-transitions." msgstr "" #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Transition: " -msgstr "Ãtmenet" +msgstr "Ãtmenet: " #: editor/plugins/animation_state_machine_editor.cpp -#, fuzzy msgid "Play Mode:" -msgstr "Pásztázás Mód" +msgstr "Lejátszási mód:" #: editor/plugins/animation_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "AnimationTree" -msgstr "AnimációFa" +msgstr "" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "New name:" @@ -5123,37 +4900,32 @@ msgid "Request failed, return code:" msgstr "Kérés sikertelen, visszatérési kód:" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Request failed." -msgstr "Kérés Sikertelen." +msgstr "A kérés sikertelen." #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Cannot save response to:" -msgstr "Nem eltávolÃtható:" +msgstr "A válasz nem menthetÅ‘:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Write error." -msgstr "" +msgstr "Ãrási hiba." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Request failed, too many redirects" msgstr "Kérés sikertelen, túl sok átirányÃtás" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Redirect loop." -msgstr "ÃtirányÃtási Hurok." +msgstr "Hurok átirányÃtása." #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Request failed, timeout" -msgstr "Kérés sikertelen, visszatérési kód:" +msgstr "A kérés nem sikerült, idÅ‘túllépés" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Timeout." -msgstr "IdÅ‘" +msgstr "IdÅ‘túllépés." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Bad download hash, assuming file has been tampered with." @@ -5178,14 +4950,12 @@ msgid "Asset Download Error:" msgstr "Eszköz Letöltési Hiba:" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Downloading (%s / %s)..." -msgstr "Letöltés" +msgstr "Letöltés (%s / %s)..." #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Downloading..." -msgstr "Letöltés" +msgstr "Letöltés..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Resolving..." @@ -5200,9 +4970,8 @@ msgid "Idle" msgstr "Tétlen" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Install..." -msgstr "TelepÃtés" +msgstr "TelepÃtés..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Retry" @@ -5218,39 +4987,35 @@ msgstr "Ennek az eszköznek a letöltése már folyamatban van!" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Recently Updated" -msgstr "" +msgstr "Nemrég frissÃtve" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Least Recently Updated" -msgstr "" +msgstr "Legutóbb frissÃtve" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Name (A-Z)" -msgstr "" +msgstr "Név (A-Z)" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Name (Z-A)" -msgstr "" +msgstr "Név (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "License (A-Z)" -msgstr "Licenc" +msgstr "Licenc (A-Z)" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "License (Z-A)" -msgstr "Licenc" +msgstr "Licenc (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "First" -msgstr "elsÅ‘" +msgstr "ElsÅ‘" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Previous" -msgstr "ElÅ‘zÅ‘ fül" +msgstr "ElÅ‘zÅ‘" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Next" @@ -5258,7 +5023,7 @@ msgstr "KövetkezÅ‘" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Last" -msgstr "" +msgstr "Utolsó" #: editor/plugins/asset_library_editor_plugin.cpp msgid "All" @@ -5266,17 +5031,15 @@ msgstr "Mind" #: editor/plugins/asset_library_editor_plugin.cpp msgid "No results for \"%s\"." -msgstr "" +msgstr "Nincs találat a következÅ‘re: \"%s\"." #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Import..." -msgstr "Importálás" +msgstr "Importálás..." #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Plugins..." -msgstr "BÅ‘vÃtmények" +msgstr "BÅ‘vÃtmények..." #: editor/plugins/asset_library_editor_plugin.cpp editor/project_manager.cpp msgid "Sort:" @@ -5292,9 +5055,8 @@ msgid "Site:" msgstr "Oldal:" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Support" -msgstr "Támogatás..." +msgstr "Támogatás" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Official" @@ -5305,9 +5067,8 @@ msgid "Testing" msgstr "Tesztelés" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgid "Loading..." -msgstr "Betöltés" +msgstr "Betöltés..." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -5344,7 +5105,7 @@ msgid "Bake Lightmaps" msgstr "Fény Besütése" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "ElÅ‘nézet" @@ -5362,12 +5123,11 @@ msgstr "Rács Léptetés:" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Primary Line Every:" -msgstr "" +msgstr "ElsÅ‘dleges vonal minden:" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "steps" -msgstr "2 lépés" +msgstr "lépés" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Rotation Offset:" @@ -5378,74 +5138,60 @@ msgid "Rotation Step:" msgstr "Forgatási Léptetés:" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Scale Step:" -msgstr "Skála:" +msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Move Vertical Guide" -msgstr "FüggÅ‘leges vezetÅ‘vonal mozgatása" +msgstr "FüggÅ‘leges segédvonal mozgatása" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Create Vertical Guide" -msgstr "Új függÅ‘leges vezetÅ‘vonal létrehozása" +msgstr "FüggÅ‘leges segédvonal létrehozása" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Remove Vertical Guide" -msgstr "FüggÅ‘leges vezetÅ‘vonal eltávolÃtása" +msgstr "FüggÅ‘leges segédvonal eltávolÃtása" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Move Horizontal Guide" -msgstr "VÃzszintes vezetÅ‘vonal mozgatása" +msgstr "VÃzszintes segédvonal mozgatása" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Create Horizontal Guide" -msgstr "Új vÃzszintes vezetÅ‘vonal létrehozása" +msgstr "VÃzszintes segédvonal létrehozása" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Remove Horizontal Guide" -msgstr "VÃzszintes vezetÅ‘vonal eltávolÃtása" +msgstr "VÃzszintes segédvonal eltávolÃtása" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Create Horizontal and Vertical Guides" -msgstr "Új vÃzszintes és függÅ‘leges vezetÅ‘vonalak létrehozása" +msgstr "VÃzszintes és függÅ‘leges segédvonalak létrehozása" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Move pivot" -msgstr "Forgatási Pont Mozgatása" +msgstr "Forgatási pont áthelyezése" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Rotate CanvasItem" -msgstr "CanvasItem Szerkesztése" +msgstr "CanvasItem forgatása" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Move anchor" -msgstr "Mozgási Művelet" +msgstr "Horgony áthelyezése" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Resize CanvasItem" -msgstr "CanvasItem Szerkesztése" +msgstr "CanvasItem átméretezése" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Scale CanvasItem" -msgstr "CanvasItem Szerkesztése" +msgstr "CanvasItem méretezése" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Move CanvasItem" -msgstr "CanvasItem Szerkesztése" +msgstr "CanvasItem áthelyezése" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -5464,62 +5210,52 @@ msgid "" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Top Left" -msgstr "Forgató mód" +msgstr "Bal felsÅ‘" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Top Right" -msgstr "Sokszög Forgatása" +msgstr "Jobb felsÅ‘" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Bottom Right" -msgstr "Sokszög Forgatása" +msgstr "Jobb alsó" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Bottom Left" -msgstr "Forgató mód" +msgstr "Bal alsó" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Center Left" -msgstr "Behúzás Balra" +msgstr "Bal közép" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Center Top" -msgstr "Kijelölés Középre" +msgstr "FelsÅ‘ közép" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Center Right" -msgstr "Behúzás Jobbra" +msgstr "Jobbra közép" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Center Bottom" -msgstr "Kijelölés Középre" +msgstr "Középre lent" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Center" -msgstr "" +msgstr "Középre" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Left Wide" -msgstr "Bal lineáris" +msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Top Wide" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Right Wide" -msgstr "Jobb lineáris" +msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Bottom Wide" @@ -5534,13 +5270,13 @@ msgid "HCenter Wide" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp +#, fuzzy msgid "Full Rect" -msgstr "" +msgstr "Teljes téglalap" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Keep Ratio" -msgstr "Méretezési arány:" +msgstr "Arány megtartása" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Anchors only" @@ -5570,45 +5306,39 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Lock Selected" -msgstr "Kiválaszt" +msgstr "Kijelölés zárolása" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Unlock Selected" -msgstr "" +msgstr "Kijelölés feloldása" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Group Selected" -msgstr "Kiválasztás eltávolÃtás" +msgstr "Kijelöltek csoportosÃtása" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Ungroup Selected" -msgstr "Kiválasztás eltávolÃtás" +msgstr "kijelölt csoportok szétbontása" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Paste Pose" msgstr "Póz Beillesztése" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Clear Guides" -msgstr "Póz Törlése" +msgstr "Segédvonalak törlése" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Create Custom Bone(s) from Node(s)" -msgstr "Kibocsátási Pontok Létrehozása A Mesh Alapján" +msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Clear Bones" -msgstr "Póz Törlése" +msgstr "Csontok törlése" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Make IK Chain" @@ -5627,9 +5357,8 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/texture_region_editor_plugin.cpp #: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp -#, fuzzy msgid "Zoom Reset" -msgstr "KicsinyÃtés" +msgstr "NagyÃtás visszaállÃtása" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5657,7 +5386,7 @@ msgstr "Alt + Jobb Egérgomb: Mélységi lista választás" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Move Mode" -msgstr "Mozgás Mód" +msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5666,9 +5395,8 @@ msgstr "Forgató mód" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Scale Mode" -msgstr "Kiválasztó Mód" +msgstr "Méretezési mód" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5688,32 +5416,26 @@ msgid "Pan Mode" msgstr "Pásztázás Mód" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Ruler Mode" -msgstr "Kiválasztó Mód" +msgstr "Vonalzó mód" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Toggle smart snapping." -msgstr "Illesztés be- és kikapcsolása" +msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Use Smart Snap" -msgstr "Illesztés Használata" +msgstr "Intelligens illesztés használata" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Toggle grid snapping." -msgstr "Illesztés be- és kikapcsolása" +msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Use Grid Snap" -msgstr "Illesztés Használata" +msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Snapping Options" msgstr "Illesztési beállÃtások" @@ -5722,9 +5444,8 @@ msgid "Use Rotation Snap" msgstr "Forgatási Illesztés Használata" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Use Scale Snap" -msgstr "Illesztés Használata" +msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Snap Relative" @@ -5735,7 +5456,6 @@ msgid "Use Pixel Snap" msgstr "Pixelhez Illesztés" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Smart Snapping" msgstr "Intelligens illesztés" @@ -5745,34 +5465,28 @@ msgid "Configure Snap..." msgstr "Illesztés BeállÃtása..." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Snap to Parent" msgstr "Illesztés szülÅ‘höz" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Snap to Node Anchor" -msgstr "Illesztés Node horgonyhoz" +msgstr "Illesztés node horgonyhoz" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Snap to Node Sides" -msgstr "Illesztés Node oldalakhoz" +msgstr "Illesztés node oldalakhoz" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Snap to Node Center" -msgstr "Illesztés Node horgonyhoz" +msgstr "Illesztés node középponthoz" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Snap to Other Nodes" -msgstr "Illesztés más Node-okhoz" +msgstr "Illesztés más node-okhoz" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Snap to Guides" -msgstr "Illesztés vezetÅ‘vonalakhoz" +msgstr "Illesztés segédvonalakhoz" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5795,9 +5509,8 @@ msgid "Restores the object's children's ability to be selected." msgstr "Újra kiválaszthatóvá teszi az objektum gyermekeit." #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Skeleton Options" -msgstr "Egyke" +msgstr "Csontváz beállÃtások" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Show Bones" @@ -5808,9 +5521,8 @@ msgid "Make Custom Bone(s) from Node(s)" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Clear Custom Bones" -msgstr "Csontok Törlése" +msgstr "Egyéni csontok törlése" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -5818,13 +5530,12 @@ msgid "View" msgstr "Nézet" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Always Show Grid" -msgstr "Rács MegjelenÃtése" +msgstr "Rács megjelenÃtése mindig" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Show Helpers" -msgstr "SegÃtÅ‘k MegjelenÃtése" +msgstr "SegÃtÅ‘k megjelenÃtése" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Show Rulers" @@ -5848,7 +5559,7 @@ msgstr "Csoport MegjelenÃtése és ikonok zárolása" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Center Selection" -msgstr "Kijelölés Középre" +msgstr "Kijelölés középre" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Frame Selection" @@ -5871,9 +5582,8 @@ msgid "Scale mask for inserting keys." msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Insert keys (based on mask)." -msgstr "Kulcs Beszúrása (MeglévÅ‘ Nyomvonalakra)" +msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -5884,14 +5594,12 @@ msgid "" msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Auto Insert Key" -msgstr "Animáció kulcs beillesztés" +msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Animation Key and Pose Options" -msgstr "Animáció hossza (másodpercben)" +msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Insert Key (Existing Tracks)" @@ -5903,7 +5611,7 @@ msgstr "Póz Másolása" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Clear Pose" -msgstr "Póz Törlése" +msgstr "Póz törlése" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Multiply grid step by 2" @@ -5914,9 +5622,8 @@ msgid "Divide grid step by 2" msgstr "Rács Léptetés Mértékének Felezése" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Pan View" -msgstr "Nézet" +msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Add %s" @@ -5941,9 +5648,8 @@ msgid "Error instancing scene from %s" msgstr "Hiba történt a Scene példányosÃtáskor %s-bÅ‘l" #: editor/plugins/canvas_item_editor_plugin.cpp -#, fuzzy msgid "Change Default Type" -msgstr "Alapértelmezett tÃpus megváltoztatása" +msgstr "Alapértelmezett tÃpus módosÃtása" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "" @@ -5954,9 +5660,8 @@ msgstr "" "Fogd és vidd + Alt: Node tÃpusának megváltoztatása" #: editor/plugins/collision_polygon_editor_plugin.cpp -#, fuzzy msgid "Create Polygon3D" -msgstr "Sokszög Létrehozása" +msgstr "" #: editor/plugins/collision_polygon_editor_plugin.cpp msgid "Edit Poly" @@ -5979,9 +5684,8 @@ msgstr "Kibocsátási Maszk Betöltése" #: editor/plugins/cpu_particles_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp #: editor/plugins/particles_editor_plugin.cpp -#, fuzzy msgid "Restart" -msgstr "ÚjraindÃtás (mp):" +msgstr "ÚjraindÃtás" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp @@ -6016,9 +5720,8 @@ msgstr "" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp -#, fuzzy msgid "Directed Border Pixels" -msgstr "Könyvtárak és Fájlok:" +msgstr "" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp @@ -6028,12 +5731,12 @@ msgstr "Kinyerés PixelbÅ‘l" #: editor/plugins/cpu_particles_2d_editor_plugin.cpp #: editor/plugins/particles_2d_editor_plugin.cpp msgid "Emission Colors" -msgstr "Kibocsátási SzÃnek" +msgstr "Kibocsátási szÃnek" #: editor/plugins/cpu_particles_editor_plugin.cpp #, fuzzy msgid "CPUParticles" -msgstr "Részecskék" +msgstr "CPU-részecskék" #: editor/plugins/cpu_particles_editor_plugin.cpp #: editor/plugins/particles_editor_plugin.cpp @@ -6051,7 +5754,6 @@ msgid "Flat 0" msgstr "Lapos 0" #: editor/plugins/curve_editor_plugin.cpp -#, fuzzy msgid "Flat 1" msgstr "Lapos 1" @@ -6080,22 +5782,18 @@ msgid "Load Curve Preset" msgstr "ElÅ‘re BeállÃtott Görbe Betöltése" #: editor/plugins/curve_editor_plugin.cpp -#, fuzzy msgid "Add Point" msgstr "Pont hozzáadása" #: editor/plugins/curve_editor_plugin.cpp -#, fuzzy msgid "Remove Point" msgstr "Pont eltávolÃtása" #: editor/plugins/curve_editor_plugin.cpp -#, fuzzy msgid "Left Linear" msgstr "Bal lineáris" #: editor/plugins/curve_editor_plugin.cpp -#, fuzzy msgid "Right Linear" msgstr "Jobb lineáris" @@ -6117,9 +5815,8 @@ msgid "Hold Shift to edit tangents individually" msgstr "Tartsa lenyomva a Shift gombot az érintÅ‘k egyenkénti szerkesztéséhez" #: editor/plugins/curve_editor_plugin.cpp -#, fuzzy msgid "Right click to add point" -msgstr "Jobb Kattintás: Pont Törlése" +msgstr "Kattintson a jobb gombbal a pont hozzáadásához" #: editor/plugins/gi_probe_editor_plugin.cpp msgid "Bake GI Probe" @@ -6127,7 +5824,7 @@ msgstr "GI Szonda Besütése" #: editor/plugins/gradient_editor_plugin.cpp msgid "Gradient Edited" -msgstr "" +msgstr "SzÃnátmenet szerkesztve" #: editor/plugins/item_list_editor_plugin.cpp msgid "Item %d" @@ -6150,9 +5847,8 @@ msgid "Mesh is empty!" msgstr "A háló üres!" #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Couldn't create a Trimesh collision shape." -msgstr "Trimesh Ãœtközési Testvér Létrehozása" +msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Static Trimesh Body" @@ -6163,9 +5859,8 @@ msgid "This doesn't work on scene root!" msgstr "Ez nem hajtható végre a gyökér Scene-en!" #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Trimesh Static Shape" -msgstr "Trimesh Alakzat Létrehozása" +msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Can't create a single convex collision shape for the scene root." @@ -6176,23 +5871,20 @@ msgid "Couldn't create a single convex collision shape." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Single Convex Shape" -msgstr "Konvex Alakzat Létrehozása" +msgstr "Konvex alakzat létrehozása" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Can't create multiple convex collision shapes for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Couldn't create any collision shapes." -msgstr "KörvonalkészÃtés sikertelen!" +msgstr "Nem sikerült ütközési alakzatokat létrehozni." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Multiple Convex Shapes" -msgstr "Konvex Alakzat Létrehozása" +msgstr "Több konvex alakzat létrehozása" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Navigation Mesh" @@ -6261,9 +5953,8 @@ msgid "" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Single Convex Collision Sibling" -msgstr "Konvex Ãœtközési Testvér Létrehozása" +msgstr "Konvex ütközési testvér létrehozása" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "" @@ -6272,9 +5963,8 @@ msgid "" msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Multiple Convex Collision Siblings" -msgstr "Konvex Ãœtközési Testvér Létrehozása" +msgstr "Több konvex ütközési testvér létrehozása" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "" @@ -6323,16 +6013,16 @@ msgid "Remove item %d?" msgstr "%d elem eltávolÃtása?" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "" "Update from existing scene?:\n" "%s" -msgstr "FrissÃtés JelenetbÅ‘l" +msgstr "" +"FrissÃti a meglévÅ‘ jelenetbÅ‘l?:\n" +"%s" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "Mesh Library" -msgstr "MeshLibrary-ra..." +msgstr "MeshLibrary" #: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/theme_editor_plugin.cpp @@ -6453,12 +6143,11 @@ msgstr "Navigációs Sokszög Létrehozása" #: editor/plugins/particles_editor_plugin.cpp #, fuzzy msgid "Convert to CPUParticles" -msgstr "Konvertálás Nagybetűsre" +msgstr "Konvertálás CPU-részecskékké" #: editor/plugins/particles_2d_editor_plugin.cpp -#, fuzzy msgid "Generating Visibility Rect" -msgstr "Láthatósági Téglalap Generálása" +msgstr "Láthatósági téglalap generálása" #: editor/plugins/particles_2d_editor_plugin.cpp msgid "Generate Visibility Rect" @@ -6478,23 +6167,20 @@ msgid "The geometry's faces don't contain any area." msgstr "" #: editor/plugins/particles_editor_plugin.cpp -#, fuzzy msgid "The geometry doesn't contain any faces." -msgstr "A Node nem tartalmaz geometriát (oldalakat)." +msgstr "A geometria nem tartalmaz oldalakat." #: editor/plugins/particles_editor_plugin.cpp msgid "\"%s\" doesn't inherit from Spatial." msgstr "" #: editor/plugins/particles_editor_plugin.cpp -#, fuzzy msgid "\"%s\" doesn't contain geometry." -msgstr "A Node nem tartalmaz geometriát." +msgstr "A(z) \"%s\" nem tartalmaz geometriát." #: editor/plugins/particles_editor_plugin.cpp -#, fuzzy msgid "\"%s\" doesn't contain face geometry." -msgstr "A Node nem tartalmaz geometriát." +msgstr "A(z) \"%s\" nem tartalmaz lapgeometriát." #: editor/plugins/particles_editor_plugin.cpp msgid "Create Emitter" @@ -6554,9 +6240,8 @@ msgid "Add Point to Curve" msgstr "Pont Hozzáadása a Görbéhez" #: editor/plugins/path_2d_editor_plugin.cpp -#, fuzzy msgid "Split Curve" -msgstr "Görbe Lezárása" +msgstr "" #: editor/plugins/path_2d_editor_plugin.cpp msgid "Move Point in Curve" @@ -6586,9 +6271,8 @@ msgid "Click: Add Point" msgstr "Kattintás: Pont Hozzáadása" #: editor/plugins/path_2d_editor_plugin.cpp -#, fuzzy msgid "Left Click: Split Segment (in curve)" -msgstr "Szakasz Felosztása (görbén)" +msgstr "" #: editor/plugins/path_2d_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp @@ -6667,9 +6351,8 @@ msgid "Split Segment (in curve)" msgstr "Szakasz Felosztása (görbén)" #: editor/plugins/physical_bone_plugin.cpp -#, fuzzy msgid "Move Joint" -msgstr "Pont Mozgatása" +msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "" @@ -6677,9 +6360,8 @@ msgid "" msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Sync Bones" -msgstr "Csontok Mutatása" +msgstr "Csontok szinkronizálása" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "" @@ -6698,51 +6380,44 @@ msgid "" msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Create Polygon & UV" -msgstr "Sokszög Létrehozása" +msgstr "Sokszög és UV létrehozása" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Create Internal Vertex" -msgstr "Új vÃzszintes vezetÅ‘vonal létrehozása" +msgstr "BelsÅ‘ csúcspont létrehozása" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Remove Internal Vertex" -msgstr "Be-VezérlÅ‘ Pont EltávolÃtása" +msgstr "BelsÅ‘ csúcspont eltávolÃtása" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Invalid Polygon (need 3 different vertices)" msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Add Custom Polygon" -msgstr "Sokszög Szerkesztése" +msgstr "Egyéni sokszög hozzáadása" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Remove Custom Polygon" -msgstr "Sokszög és Pont EltávolÃtása" +msgstr "Egyéni sokszög eltávolÃtása" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Transform UV Map" msgstr "UV Térkép Transzformálása" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Transform Polygon" -msgstr "Sokszög Létrehozása" +msgstr "Sokszög átalakÃtása" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Paint Bone Weights" msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Open Polygon 2D UV editor." -msgstr "2D UV Sokszög SzerkesztÅ‘" +msgstr "2D UV sokszög szerkesztÅ‘ megnyitása." #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Polygon 2D UV Editor" @@ -6753,24 +6428,20 @@ msgid "UV" msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Points" -msgstr "Pont Mozgatása" +msgstr "Pontok" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Polygons" -msgstr "Sokszög -> UV" +msgstr "Sokszögek" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Bones" -msgstr "Csontok Létrehozása" +msgstr "Csontok" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Move Points" -msgstr "Pont Mozgatása" +msgstr "Pontok mozgatása" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Ctrl: Rotate" @@ -6831,9 +6502,8 @@ msgid "Clear UV" msgstr "UV Törlése" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Grid Settings" -msgstr "SzerkesztÅ‘ BeállÃtások" +msgstr "Rács beállÃtásai" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Snap" @@ -6852,34 +6522,29 @@ msgid "Show Grid" msgstr "Rács MegjelenÃtése" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Configure Grid:" -msgstr "Illesztés BeállÃtása" +msgstr "Rács beállÃtása:" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Grid Offset X:" -msgstr "Rács Eltolás:" +msgstr "Rács X eltolása:" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Grid Offset Y:" -msgstr "Rács Eltolás:" +msgstr "Rács Y eltolása:" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Grid Step X:" -msgstr "Rács Léptetés:" +msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp -#, fuzzy msgid "Grid Step Y:" -msgstr "Rács Léptetés:" +msgstr "" #: editor/plugins/polygon_2d_editor_plugin.cpp #, fuzzy msgid "Sync Bones to Polygon" -msgstr "Sokszög Skálázása" +msgstr "Csontok szinkronizálása a sokszöggel" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" @@ -6936,9 +6601,8 @@ msgid "AnimationTree has no path set to an AnimationPlayer" msgstr "" #: editor/plugins/root_motion_editor_plugin.cpp -#, fuzzy msgid "Path to AnimationPlayer is invalid" -msgstr "Az animációs fa érvénytelen." +msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Clear Recent Files" @@ -6949,54 +6613,44 @@ msgid "Close and save changes?" msgstr "Bezárja és menti a változásokat?" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Error writing TextFile:" -msgstr "Hiba TileSet mentésekor!" +msgstr "" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Could not load file at:" -msgstr "Nem sikerült létrehozni a mappát." +msgstr "" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Error saving file!" -msgstr "Hiba TileSet mentésekor!" +msgstr "Hiba a fájl mentésekor!" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Error while saving theme." -msgstr "HIba történt a téma mentésekor" +msgstr "Hiba történt a téma mentésekor." #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Error Saving" -msgstr "Hiba mentés közben" +msgstr "Hiba a mentéskor" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Error importing theme." -msgstr "Hiba történt a téma importálásakor" +msgstr "Hiba történt a téma importálásakor." #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Error Importing" msgstr "Hiba importáláskor" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "New Text File..." -msgstr "Új Mappa..." +msgstr "Új szövegfájl..." #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Open File" -msgstr "Fálj Megnyitása" +msgstr "Fájl megnyitása" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Save File As..." -msgstr "Mentés Másként..." +msgstr "Fájl mentése másként..." #: editor/plugins/script_editor_plugin.cpp msgid "Can't obtain the script for running." @@ -7032,9 +6686,8 @@ msgid "Save Theme As..." msgstr "Téma Mentése Másként..." #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "%s Class Reference" -msgstr " Osztály Referencia" +msgstr "" #: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp @@ -7047,18 +6700,16 @@ msgid "Find Previous" msgstr "ElÅ‘zÅ‘ Keresése" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Filter scripts" -msgstr "Objektumtulajdonságok." +msgstr "Szkriptek szűrése" #: editor/plugins/script_editor_plugin.cpp msgid "Toggle alphabetical sorting of the method list." msgstr "" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Filter methods" -msgstr "Objektumtulajdonságok." +msgstr "" #: editor/plugins/script_editor_plugin.cpp msgid "Sort" @@ -7089,14 +6740,12 @@ msgid "File" msgstr "Fájl" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Open..." -msgstr "Megnyit" +msgstr "Megnyitás..." #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Reopen Closed Script" -msgstr "Szkript Futtatása" +msgstr "Bezárt szkript újbóli megnyitása" #: editor/plugins/script_editor_plugin.cpp msgid "Save All" @@ -7111,9 +6760,8 @@ msgid "Copy Script Path" msgstr "Szkript Útvonal Másolása" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "History Previous" -msgstr "ElÅ‘zÅ‘ ElÅ‘zmény" +msgstr "ElÅ‘zÅ‘ elÅ‘zmény" #: editor/plugins/script_editor_plugin.cpp msgid "History Next" @@ -7125,9 +6773,8 @@ msgid "Theme" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Import Theme..." -msgstr "Téma Importálása" +msgstr "Téma importálása..." #: editor/plugins/script_editor_plugin.cpp msgid "Reload Theme" @@ -7171,14 +6818,12 @@ msgid "Keep Debugger Open" msgstr "HibakeresÅ‘ Nyitva Tartása" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Debug with External Editor" msgstr "Hibakeresés külsÅ‘ szerkesztÅ‘vel" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Open Godot online documentation." -msgstr "Godot online dokumentáció megnyitása" +msgstr "Godot online dokumentáció megnyitása." #: editor/plugins/script_editor_plugin.cpp msgid "Search the reference documentation." @@ -7219,22 +6864,18 @@ msgid "Debugger" msgstr "HibakeresÅ‘" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Search Results" -msgstr "Keresés Súgóban" +msgstr "Keresési eredmények" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Clear Recent Scripts" -msgstr "Legutóbbi Jelenetek Törlése" +msgstr "Legutóbbi szkriptek törlése" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Connections to method:" -msgstr "Csatlakoztatás Node-hoz:" +msgstr "" #: editor/plugins/script_text_editor.cpp editor/script_editor_debugger.cpp -#, fuzzy msgid "Source" msgstr "Forrás" @@ -7243,24 +6884,21 @@ msgid "Target" msgstr "" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "" "Missing connected method '%s' for signal '%s' from node '%s' to node '%s'." -msgstr "'%s' Lecsatlakoztatása '%s'-ról" +msgstr "" #: editor/plugins/script_text_editor.cpp msgid "[Ignore]" msgstr "" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Line" -msgstr "Sor:" +msgstr "" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Go to Function" -msgstr "Ugrás Funkcióra..." +msgstr "Ugrás függvényre" #: editor/plugins/script_text_editor.cpp msgid "Only resources from filesystem can be dropped." @@ -7272,9 +6910,8 @@ msgid "Can't drop nodes because script '%s' is not used in this scene." msgstr "" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Lookup Symbol" -msgstr "Szimbólum Befejezése" +msgstr "" #: editor/plugins/script_text_editor.cpp msgid "Pick Color" @@ -7311,9 +6948,8 @@ msgid "Bookmarks" msgstr "" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Breakpoints" -msgstr "Pontok Törlése" +msgstr "Töréspontok" #: editor/plugins/script_text_editor.cpp scene/gui/line_edit.cpp #: scene/gui/text_edit.cpp @@ -7362,66 +6998,56 @@ msgid "Complete Symbol" msgstr "Szimbólum Befejezése" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Evaluate Selection" -msgstr "Kiválasztás átméretezés" +msgstr "" #: editor/plugins/script_text_editor.cpp msgid "Trim Trailing Whitespace" msgstr "Sorvégi Szóközök LenyÃrása" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Convert Indent to Spaces" -msgstr "Behúzások Ãtkonvertálása Szóközökre" +msgstr "Behúzás átalakÃtása szóközökké" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Convert Indent to Tabs" -msgstr "Behúzások Ãtkonvertálása Tabokra" +msgstr "Behúzás átalakÃtása tabokra" #: editor/plugins/script_text_editor.cpp msgid "Auto Indent" msgstr "Automatikus Behúzás" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Find in Files..." -msgstr "Fájlok Szűrése..." +msgstr "Keresés a fájlokban..." #: editor/plugins/script_text_editor.cpp msgid "Contextual Help" msgstr "Kontextusérzékeny Súgó" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Toggle Bookmark" -msgstr "Töréspont Elhelyezése" +msgstr "KönyvjelzÅ‘ be- és kikapcsolása" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Go to Next Bookmark" -msgstr "Ugrás KövetkezÅ‘ Töréspontra" +msgstr "Ugrás a következÅ‘ könyvjelzÅ‘re" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Go to Previous Bookmark" -msgstr "Ugrás ElÅ‘zÅ‘ Töréspontra" +msgstr "Ugrás az elÅ‘zÅ‘ könyvjelzÅ‘re" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Remove All Bookmarks" -msgstr "Összes Töréspont EltávolÃtása" +msgstr "Összes könyvjelzÅ‘ eltávolÃtása" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Go to Function..." -msgstr "Ugrás Funkcióra..." +msgstr "Ugrás függvényre..." #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Go to Line..." -msgstr "Ugrás Sorra..." +msgstr "Ugrás sorra..." #: editor/plugins/script_text_editor.cpp #: modules/visual_script/visual_script_editor.cpp @@ -7433,23 +7059,18 @@ msgid "Remove All Breakpoints" msgstr "Összes Töréspont EltávolÃtása" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Go to Next Breakpoint" -msgstr "Ugrás KövetkezÅ‘ Töréspontra" +msgstr "Ugrás a következÅ‘ töréspontra" #: editor/plugins/script_text_editor.cpp -#, fuzzy msgid "Go to Previous Breakpoint" -msgstr "Ugrás ElÅ‘zÅ‘ Töréspontra" +msgstr "Ugrás az elÅ‘zÅ‘ töréspontra" #: editor/plugins/shader_editor_plugin.cpp -#, fuzzy msgid "" "This shader has been modified on on disk.\n" "What action should be taken?" msgstr "" -"A alábbi fájlok újabbak a lemezen.\n" -"Mit szeretne lépni?:" #: editor/plugins/shader_editor_plugin.cpp msgid "Shader" @@ -7460,9 +7081,8 @@ msgid "This skeleton has no bones, create some children Bone2D nodes." msgstr "" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Create Rest Pose from Bones" -msgstr "Kibocsátási Pontok Létrehozása A Mesh Alapján" +msgstr "" #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "Set Rest Pose to Bones" @@ -7471,7 +7091,7 @@ msgstr "" #: editor/plugins/skeleton_2d_editor_plugin.cpp #, fuzzy msgid "Skeleton2D" -msgstr "Egyke" +msgstr "Csontváz2D" #: editor/plugins/skeleton_2d_editor_plugin.cpp msgid "Make Rest Pose (From Bones)" @@ -7482,23 +7102,20 @@ msgid "Set Bones to Rest Pose" msgstr "" #: editor/plugins/skeleton_editor_plugin.cpp -#, fuzzy msgid "Create physical bones" -msgstr "Navigációs Háló Létrehozása" +msgstr "Fizikai csontok létrehozása" #: editor/plugins/skeleton_editor_plugin.cpp -#, fuzzy msgid "Skeleton" -msgstr "Egyke" +msgstr "Csontváz" #: editor/plugins/skeleton_editor_plugin.cpp msgid "Create physical skeleton" msgstr "" #: editor/plugins/skeleton_ik_editor_plugin.cpp -#, fuzzy msgid "Play IK" -msgstr "Játék" +msgstr "" #: editor/plugins/spatial_editor_plugin.cpp msgid "Orthogonal" @@ -7689,14 +7306,12 @@ msgid "Audio Listener" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Enable Doppler" -msgstr "Animáció hossz változtatás" +msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Cinematic Preview" -msgstr "Háló ElÅ‘nézetek Létrehozása" +msgstr "Filmszerű elÅ‘nézet" #: editor/plugins/spatial_editor_plugin.cpp msgid "Not available when using the GLES2 renderer." @@ -7758,9 +7373,8 @@ msgid "" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Snap Nodes To Floor" -msgstr "Rácshoz illesztés" +msgstr "Node-ok illesztése a padlóhoz" #: editor/plugins/spatial_editor_plugin.cpp msgid "Couldn't find a solid floor to snap the selection to." @@ -7831,9 +7445,8 @@ msgid "Transform" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Snap Object to Floor" -msgstr "Rácshoz illesztés" +msgstr "Objektum illesztése a padlóhoz" #: editor/plugins/spatial_editor_plugin.cpp msgid "Transform Dialog..." @@ -7877,9 +7490,8 @@ msgstr "" #: editor/plugins/spatial_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Settings..." -msgstr "SzerkesztÅ‘ BeállÃtások" +msgstr "BeállÃtások..." #: editor/plugins/spatial_editor_plugin.cpp msgid "Snap Settings" @@ -7946,48 +7558,40 @@ msgid "Nameless gizmo" msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create Mesh2D" -msgstr "Körvonalháló KészÃtése" +msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Mesh2D Preview" -msgstr "Háló ElÅ‘nézetek Létrehozása" +msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create Polygon2D" -msgstr "Sokszög Létrehozása" +msgstr "" #: editor/plugins/sprite_editor_plugin.cpp msgid "Polygon2D Preview" msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create CollisionPolygon2D" -msgstr "Navigációs Sokszög Létrehozása" +msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "CollisionPolygon2D Preview" -msgstr "Navigációs Sokszög Létrehozása" +msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create LightOccluder2D" -msgstr "Ãrnyékoló Sokszög Létrehozása" +msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "LightOccluder2D Preview" -msgstr "Ãrnyékoló Sokszög Létrehozása" +msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Sprite is empty!" -msgstr "A háló üres!" +msgstr "A Sprite üres!" #: editor/plugins/sprite_editor_plugin.cpp msgid "Can't convert a sprite using animation frames to mesh." @@ -7998,36 +7602,32 @@ msgid "Invalid geometry, can't replace by mesh." msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Convert to Mesh2D" -msgstr "Konvertálás Nagybetűsre" +msgstr "" #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't create polygon." msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Convert to Polygon2D" -msgstr "Sokszög Mozgatása" +msgstr "" #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't create collision polygon." msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create CollisionPolygon2D Sibling" -msgstr "Navigációs Sokszög Létrehozása" +msgstr "" #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't create light occluder." msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Create LightOccluder2D Sibling" -msgstr "Ãrnyékoló Sokszög Létrehozása" +msgstr "" #: editor/plugins/sprite_editor_plugin.cpp msgid "Sprite" @@ -8046,19 +7646,16 @@ msgid "Grow (Pixels): " msgstr "" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Update Preview" -msgstr "ElÅ‘nézet" +msgstr "ElÅ‘nézet frissÃtése" #: editor/plugins/sprite_editor_plugin.cpp -#, fuzzy msgid "Settings:" -msgstr "SzerkesztÅ‘ BeállÃtások" +msgstr "BeállÃtások:" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "No Frames Selected" -msgstr "Kijelölés Keretezése" +msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add %d Frame(s)" @@ -8069,9 +7666,8 @@ msgid "Add Frame" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Unable to load images" -msgstr "Nem sikerült betölteni az erÅ‘forrást." +msgstr "Nem lehet betölteni a képeket" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "ERROR: Couldn't load frame resource!" @@ -8098,22 +7694,19 @@ msgid "(empty)" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Move Frame" -msgstr "Mozgás Mód" +msgstr "Keret mozgatása" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Animations:" -msgstr "Animáció" +msgstr "Animációk:" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "New Animation" -msgstr "Animáció" +msgstr "Új animáció" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -8123,12 +7716,11 @@ msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp #, fuzzy msgid "Animation Frames:" -msgstr "Animáció Neve:" +msgstr "Animációs képkockák:" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Add a Texture from File" -msgstr "Kinyerés PixelbÅ‘l" +msgstr "Textúra hozzáadása fájlból" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Add Frames from a Sprite Sheet" @@ -8151,9 +7743,8 @@ msgid "Move (After)" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Select Frames" -msgstr "Kiválasztó Mód" +msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Horizontal:" @@ -8164,9 +7755,8 @@ msgid "Vertical:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -#, fuzzy msgid "Select/Clear All Frames" -msgstr "Összes Kijelölése" +msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Create Frames from Sprite Sheet" @@ -8183,7 +7773,7 @@ msgstr "" #: editor/plugins/texture_region_editor_plugin.cpp #, fuzzy msgid "Set Margin" -msgstr "Fogantyú BeállÃtása" +msgstr "Margó beállÃtása" #: editor/plugins/texture_region_editor_plugin.cpp msgid "Snap Mode:" @@ -8239,9 +7829,8 @@ msgid "Remove All" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Edit Theme" -msgstr "Tagok" +msgstr "Téma szerkesztése" #: editor/plugins/theme_editor_plugin.cpp msgid "Theme editing menu." @@ -8268,23 +7857,20 @@ msgid "Create From Current Editor Theme" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Toggle Button" -msgstr "Automatikus Lejátszás Váltása" +msgstr "Váltógomb" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Disabled Button" -msgstr "Tiltva" +msgstr "Letiltott gomb" #: editor/plugins/theme_editor_plugin.cpp msgid "Item" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Disabled Item" -msgstr "Tiltva" +msgstr "Letiltott elem" #: editor/plugins/theme_editor_plugin.cpp msgid "Check Item" @@ -8313,12 +7899,12 @@ msgstr "" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy msgid "Subitem 1" -msgstr "%d elem" +msgstr "Alelem 1" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy msgid "Subitem 2" -msgstr "%d elem" +msgstr "Alelem 2" #: editor/plugins/theme_editor_plugin.cpp msgid "Has" @@ -8329,9 +7915,8 @@ msgid "Many" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Disabled LineEdit" -msgstr "Tiltva" +msgstr "Letiltott szerkesztÅ‘sor" #: editor/plugins/theme_editor_plugin.cpp msgid "Tab 1" @@ -8346,9 +7931,8 @@ msgid "Tab 3" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Editable Item" -msgstr "Rádió Elem" +msgstr "SzerkeszthetÅ‘ elem" #: editor/plugins/theme_editor_plugin.cpp msgid "Subtree" @@ -8380,18 +7964,16 @@ msgid "Color" msgstr "SzÃn" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Theme File" -msgstr "Fálj Megnyitása" +msgstr "Témafájl" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Erase Selection" msgstr "" #: editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Fix Invalid Tiles" -msgstr "Érvénytelen név." +msgstr "Érvénytelen csempék javÃtása" #: editor/plugins/tile_map_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp @@ -8419,9 +8001,8 @@ msgid "Erase TileMap" msgstr "" #: editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Find Tile" -msgstr "KövetkezÅ‘ Keresése" +msgstr "Csempe keresése" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Transpose" @@ -8434,12 +8015,11 @@ msgstr "" #: editor/plugins/tile_map_editor_plugin.cpp #, fuzzy msgid "Enable Priority" -msgstr "SzűrÅ‘k Szerkesztése" +msgstr "Prioritás engedélyezése" #: editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Filter tiles" -msgstr "Fájlok Szűrése..." +msgstr "Csempék szűrése" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Give a TileSet resource to this TileMap to use its tiles." @@ -8460,14 +8040,12 @@ msgid "Pick Tile" msgstr "" #: editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Rotate Left" -msgstr "Forgató mód" +msgstr "Forgatás balra" #: editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Rotate Right" -msgstr "Sokszög Forgatása" +msgstr "Forgatás jobbra" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Flip Horizontally" @@ -8478,9 +8056,8 @@ msgid "Flip Vertically" msgstr "" #: editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Clear Transform" -msgstr "Animáció transzformáció változtatás" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Add Texture(s) to TileSet." @@ -8489,7 +8066,7 @@ msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp #, fuzzy msgid "Remove selected Texture from TileSet." -msgstr "Jelenlegi tétel eltávolÃtása" +msgstr "TávolÃtsa el a kijelölt textúrát a csempekészletbÅ‘l." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Create from Scene" @@ -8504,27 +8081,24 @@ msgid "New Single Tile" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "New Autotile" -msgstr "Fájlok Megtekintése" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp msgid "New Atlas" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Next Coordinate" -msgstr "KövetkezÅ‘ Szkript" +msgstr "KövetkezÅ‘ koordináta" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Select the next shape, subtile, or Tile." msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Previous Coordinate" -msgstr "ElÅ‘zÅ‘ Szkript" +msgstr "ElÅ‘zÅ‘ koordináta" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Select the previous shape, subtile, or Tile." @@ -8533,101 +8107,84 @@ msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp #, fuzzy msgid "Region" -msgstr "Forgató mód" +msgstr "Régió" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Collision" -msgstr "Animáció Node" +msgstr "Ãœtközés" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Occlusion" -msgstr "Sokszög Szerkesztése" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Navigation" -msgstr "Navigációs Háló Létrehozása" +msgstr "Navigáció" #: editor/plugins/tile_set_editor_plugin.cpp #, fuzzy msgid "Bitmask" -msgstr "Forgató mód" +msgstr "Bitmaszk" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Priority" -msgstr "Projekt Exportálása" +msgstr "Prioritás" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Z Index" -msgstr "Pásztázás Mód" +msgstr "Z index" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Region Mode" -msgstr "Forgató mód" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Collision Mode" -msgstr "Animáció Node" +msgstr "Ãœtközési mód" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Occlusion Mode" -msgstr "Sokszög Szerkesztése" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Navigation Mode" -msgstr "Navigációs Háló Létrehozása" +msgstr "Navigációs mód" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Bitmask Mode" -msgstr "Forgató mód" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Priority Mode" -msgstr "Projekt Exportálása" +msgstr "Prioritás mód" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Icon Mode" -msgstr "Pásztázás Mód" +msgstr "Ikon mód" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Z Index Mode" -msgstr "Pásztázás Mód" +msgstr "Z index mód" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Copy bitmask." msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Paste bitmask." -msgstr "Animáció Beillesztése" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Erase bitmask." -msgstr "Jobb Egérgomb: Pont Törlése." +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Create a new rectangle." -msgstr "Új %s Létrehozása" +msgstr "Új téglalap létrehozása." #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Create a new polygon." -msgstr "Új sokszög létrehozása a semmibÅ‘l." +msgstr "Új sokszög létrehozása." #: editor/plugins/tile_set_editor_plugin.cpp msgid "Keep polygon inside region Rect." @@ -8647,9 +8204,8 @@ msgid "" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Remove selected texture? This will remove all tiles which use it." -msgstr "Jelenlegi tétel eltávolÃtása" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp msgid "You haven't selected a texture to remove." @@ -8664,9 +8220,8 @@ msgid "Merge from scene?" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Remove Texture" -msgstr "Sablon EltávolÃtása" +msgstr "Textúra eltávolÃtása" #: editor/plugins/tile_set_editor_plugin.cpp msgid "%s file(s) were not added because was already on the list." @@ -8679,9 +8234,8 @@ msgid "" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Delete selected Rect." -msgstr "Törli a kiválasztott fájlokat?" +msgstr "A kijelölt téglalap törlése." #: editor/plugins/tile_set_editor_plugin.cpp msgid "" @@ -8690,9 +8244,8 @@ msgid "" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Delete polygon." -msgstr "Pontok Törlése" +msgstr "Sokszög törlése." #: editor/plugins/tile_set_editor_plugin.cpp msgid "" @@ -8726,111 +8279,92 @@ msgid "Set Tile Region" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Create Tile" -msgstr "Mappa Létrehozása" +msgstr "Csempe létrehozása" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Set Tile Icon" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Edit Tile Bitmask" -msgstr "SzűrÅ‘k Szerkesztése" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Edit Collision Polygon" -msgstr "LétezÅ‘ sokszög szerkesztése:" +msgstr "Ãœtközési sokszög szerkesztése" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Edit Occlusion Polygon" -msgstr "Sokszög Szerkesztése" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Edit Navigation Polygon" -msgstr "Navigációs Sokszög Létrehozása" +msgstr "Navigációs sokszög szerkesztése" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Paste Tile Bitmask" -msgstr "Animáció Beillesztése" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Clear Tile Bitmask" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Make Polygon Concave" -msgstr "Sokszög Mozgatása" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Make Polygon Convex" -msgstr "Sokszög Mozgatása" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Remove Tile" -msgstr "Sablon EltávolÃtása" +msgstr "Csempe eltávolÃtása" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Remove Collision Polygon" -msgstr "Sokszög és Pont EltávolÃtása" +msgstr "Ãœtközési sokszög eltávolÃtása" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Remove Occlusion Polygon" -msgstr "Ãrnyékoló Sokszög Létrehozása" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Remove Navigation Polygon" -msgstr "Navigációs Sokszög Létrehozása" +msgstr "Navigációs sokszög eltávolÃtása" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Edit Tile Priority" -msgstr "SzűrÅ‘k Szerkesztése" +msgstr "Csempeprioritás szerkesztése" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Edit Tile Z Index" msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Make Convex" -msgstr "Sokszög Mozgatása" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Make Concave" -msgstr "Sokszög Mozgatása" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Create Collision Polygon" -msgstr "Navigációs Sokszög Létrehozása" +msgstr "Ãœtközési sokszög létrehozása" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "Create Occlusion Polygon" -msgstr "Ãrnyékoló Sokszög Létrehozása" +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "This property can't be changed." -msgstr "Ezt a műveletet nem lehet végrehajtani egy Scene nélkül." +msgstr "" #: editor/plugins/tile_set_editor_plugin.cpp -#, fuzzy msgid "TileSet" -msgstr "TileSet-re..." +msgstr "Csempekészlet" #: editor/plugins/version_control_editor_plugin.cpp msgid "No VCS addons are available." @@ -8841,18 +8375,16 @@ msgid "Error" msgstr "" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "No commit message was provided" -msgstr "Nincs név megadva" +msgstr "" #: editor/plugins/version_control_editor_plugin.cpp msgid "No files added to stage" msgstr "" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Commit" -msgstr "Közösség" +msgstr "" #: editor/plugins/version_control_editor_plugin.cpp msgid "VCS Addon is not initialized" @@ -8865,59 +8397,51 @@ msgstr "" #: editor/plugins/version_control_editor_plugin.cpp #, fuzzy msgid "Initialize" -msgstr "Szó Eleji Nagybetű" +msgstr "Inicializálás" #: editor/plugins/version_control_editor_plugin.cpp msgid "Staging area" msgstr "" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Detect new changes" -msgstr "Új %s Létrehozása" +msgstr "Új változások észlelése" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Changes" -msgstr "Változtatás" +msgstr "Változások" #: editor/plugins/version_control_editor_plugin.cpp msgid "Modified" msgstr "" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Renamed" -msgstr "Ãtnevezés" +msgstr "Ãtnevezve" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Deleted" -msgstr "Törlés" +msgstr "Törölve" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Typechange" -msgstr "Változtatás" +msgstr "TÃpusmódosÃtás" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Stage Selected" -msgstr "Kiválasztás átméretezés" +msgstr "" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Stage All" -msgstr "Összes Mentése" +msgstr "" #: editor/plugins/version_control_editor_plugin.cpp msgid "Add a commit message" msgstr "" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Commit Changes" -msgstr "Szkript Változtatások Szinkronizálása" +msgstr "" #: editor/plugins/version_control_editor_plugin.cpp #: modules/gdnative/gdnative_library_singleton_editor.cpp @@ -8941,19 +8465,16 @@ msgid "(GLES3 only)" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Add Output" -msgstr "Bemenet Hozzáadása" +msgstr "Kimenet hozzáadása" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Scalar" -msgstr "Skála:" +msgstr "Skalár" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Vector" -msgstr "MegfigyelÅ‘" +msgstr "Vektor" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Boolean" @@ -8964,81 +8485,70 @@ msgid "Sampler" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Add input port" -msgstr "Bemenet Hozzáadása" +msgstr "Bemeneti port hozzáadása" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Add output port" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Change input port type" -msgstr "Alapértelmezett tÃpus megváltoztatása" +msgstr "A bemeneti port tÃpusának módosÃtása" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Change output port type" -msgstr "Alapértelmezett tÃpus megváltoztatása" +msgstr "Kimeneti port tÃpusának módosÃtása" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Change input port name" -msgstr "Animáció Nevének Megváltoztatása:" +msgstr "A bemeneti port nevének módosÃtása" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Change output port name" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Remove input port" -msgstr "Pont eltávolÃtása" +msgstr "Bemeneti port eltávolÃtása" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Remove output port" -msgstr "Pont eltávolÃtása" +msgstr "Kimeneti port eltávolÃtása" #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy msgid "Set expression" -msgstr "Jelenlegi Verzió:" +msgstr "Kifejezés beállÃtása" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Resize VisualShader node" -msgstr "Ãrnyaló" +msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Set Uniform Name" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Set Input Default Port" -msgstr "BeállÃtás Alapértelmezettként '%s'-hez" +msgstr "Alapértelmezett bemeneti port beállÃtása" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Add Node to Visual Shader" -msgstr "Ãrnyaló" +msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Duplicate Nodes" -msgstr "Animáció kulcsok megkettÅ‘zése" +msgstr "Node-ok duplikálása" #: editor/plugins/visual_shader_editor_plugin.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Paste Nodes" -msgstr "" +msgstr "Node-ok beillesztése" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Delete Nodes" -msgstr "Node létrehozás" +msgstr "Node-ok törlése" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Visual Shader Input Type Changed" @@ -9057,28 +8567,25 @@ msgid "Light" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Show resulted shader code." -msgstr "Node létrehozás" +msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Create Shader Node" -msgstr "Node létrehozás" +msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy msgid "Color function." -msgstr "Ugrás Funkcióra..." +msgstr "SzÃn függvény." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Color operator." msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Grayscale function." -msgstr "Funkció KészÃtése" +msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Converts HSV vector to RGB equivalent." @@ -9089,9 +8596,8 @@ msgid "Converts RGB vector to HSV equivalent." msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Sepia function." -msgstr "Funkció KészÃtése" +msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Burn operator." @@ -9102,18 +8608,16 @@ msgid "Darken operator." msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Difference operator." -msgstr "Csak A Különbségek" +msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Dodge operator." msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "HardLight operator." -msgstr "Skaláris kezelÅ‘ változtatás" +msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Lighten operator." @@ -9134,12 +8638,11 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy msgid "Color constant." -msgstr "Ãllandó" +msgstr "SzÃnállandó." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Color uniform." -msgstr "Animáció transzformáció változtatás" +msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Returns the boolean result of the %s comparison between two parameters." @@ -9210,7 +8713,7 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy msgid "Boolean constant." -msgstr "Vec állandó változtatás" +msgstr "Logikai állandó." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Boolean uniform." @@ -9223,7 +8726,7 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy msgid "Input parameter." -msgstr "Illesztés szülÅ‘höz" +msgstr "Bemeneti paraméter." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "'%s' input parameter for vertex and fragment shader modes." @@ -9252,12 +8755,12 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy msgid "Scalar function." -msgstr "Skalár-függvény változtatás" +msgstr "Skalárfüggvény." #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy msgid "Scalar operator." -msgstr "Skaláris kezelÅ‘ változtatás" +msgstr "Skalár operátor." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "E constant (2.718282). Represents the base of the natural logarithm." @@ -9484,12 +8987,11 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy msgid "Scalar constant." -msgstr "Skaláris állandó változtatás" +msgstr "Skaláris állandó." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Scalar uniform." -msgstr "Egységes-skalár változtatás" +msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Perform the cubic texture lookup." @@ -9512,9 +9014,8 @@ msgid "2D texture uniform lookup with triplanar." msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Transform function." -msgstr "Sokszög Létrehozása" +msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9556,24 +9057,22 @@ msgid "Multiplies vector by transform." msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Transform constant." -msgstr "Sokszög Létrehozása" +msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Transform uniform." -msgstr "Sokszög Létrehozása" +msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy msgid "Vector function." -msgstr "Ugrás Funkcióra..." +msgstr "Vektor függvény." #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy msgid "Vector operator." -msgstr "Vec kezelÅ‘ változtatás" +msgstr "Vektor operátor." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Composes vector from three scalars." @@ -9692,12 +9191,11 @@ msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp #, fuzzy msgid "Vector constant." -msgstr "Vec állandó változtatás" +msgstr "Vektor állandó." #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Vector uniform." -msgstr "Egységes-vektor változtatás" +msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9765,19 +9263,16 @@ msgid "" msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "VisualShader" -msgstr "Ãrnyaló" +msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Edit Visual Property" -msgstr "SzűrÅ‘k Szerkesztése" +msgstr "" #: editor/plugins/visual_shader_editor_plugin.cpp -#, fuzzy msgid "Visual Shader Mode Changed" -msgstr "Ãrnyaló" +msgstr "" #: editor/project_export.cpp msgid "Runnable" @@ -9786,7 +9281,7 @@ msgstr "" #: editor/project_export.cpp #, fuzzy msgid "Add initial export..." -msgstr "Bemenet Hozzáadása" +msgstr "Kezdeti exportálás hozzáadása..." #: editor/project_export.cpp msgid "Add previous patches..." @@ -9818,9 +9313,8 @@ msgid "Release" msgstr "" #: editor/project_export.cpp -#, fuzzy msgid "Exporting All" -msgstr "Exportálás" +msgstr "Összes exportálása" #: editor/project_export.cpp msgid "The given export path doesn't exist:" @@ -9847,7 +9341,7 @@ msgstr "" #: editor/project_export.cpp #, fuzzy msgid "Export Path" -msgstr "Projekt Exportálása" +msgstr "Exportálási útvonal" #: editor/project_export.cpp msgid "Resources" @@ -9894,9 +9388,8 @@ msgid "Make Patch" msgstr "" #: editor/project_export.cpp -#, fuzzy msgid "Pack File" -msgstr " Fájlok" +msgstr "Csomagfájl" #: editor/project_export.cpp msgid "Features" @@ -9911,14 +9404,13 @@ msgid "Feature List:" msgstr "" #: editor/project_export.cpp -#, fuzzy msgid "Script" -msgstr "Szkript Futtatása" +msgstr "Szkript" #: editor/project_export.cpp #, fuzzy msgid "Script Export Mode:" -msgstr "Projekt Exportálása" +msgstr "Szkript exportálás módja:" #: editor/project_export.cpp msgid "Text" @@ -9949,19 +9441,16 @@ msgid "Export Project" msgstr "Projekt Exportálása" #: editor/project_export.cpp -#, fuzzy msgid "Export mode?" -msgstr "Projekt Exportálása" +msgstr "Exportálási mód?" #: editor/project_export.cpp -#, fuzzy msgid "Export All" -msgstr "Exportálás" +msgstr "Összes exportálása" #: editor/project_export.cpp editor/project_manager.cpp -#, fuzzy msgid "ZIP File" -msgstr " Fájlok" +msgstr "ZIP fájl" #: editor/project_export.cpp msgid "Godot Game Pack" @@ -9980,14 +9469,13 @@ msgid "Export With Debug" msgstr "" #: editor/project_manager.cpp -#, fuzzy msgid "The path specified doesn't exist." -msgstr "A fájl nem létezik." +msgstr "A megadott útvonal nem létezik." #: editor/project_manager.cpp #, fuzzy msgid "Error opening package file (it's not in ZIP format)." -msgstr "Hiba a csomagfájl megnyitása során, nem zip formátumú." +msgstr "Hiba a csomagfájl megnyitása során (az nem ZIP formátumú)." #: editor/project_manager.cpp msgid "" @@ -10008,7 +9496,7 @@ msgstr "" #: editor/project_manager.cpp msgid "New Game Project" -msgstr "" +msgstr "Új játék projekt" #: editor/project_manager.cpp msgid "Imported Project" @@ -10125,9 +9613,8 @@ msgid "Unnamed Project" msgstr "Névtelen projekt" #: editor/project_manager.cpp -#, fuzzy msgid "Missing Project" -msgstr "MeglévÅ‘ Projekt Importálása" +msgstr "Hiányzó projekt" #: editor/project_manager.cpp msgid "Error: Project is missing on the filesystem." @@ -10136,11 +9623,12 @@ msgstr "" #: editor/project_manager.cpp #, fuzzy msgid "Can't open project at '%s'." -msgstr "'%s' nem nyitható meg." +msgstr "A projekt nem nyitható meg a(z) %s helyen." #: editor/project_manager.cpp +#, fuzzy msgid "Are you sure to open more than one project?" -msgstr "" +msgstr "Biztos, hogy egynél több projektet nyit meg?" #: editor/project_manager.cpp msgid "" @@ -10174,15 +9662,11 @@ msgid "" msgstr "" #: editor/project_manager.cpp -#, fuzzy msgid "" "Can't run project: no main scene defined.\n" "Please edit the project and set the main scene in the Project Settings under " "the \"Application\" category." msgstr "" -"Nincs meghatározva fÅ‘jelenet, kiválaszt most egyet?\n" -"Ezt megváltoztathatja késÅ‘bb a \"Projekt BeállÃtásokban\" az \"Alkalmazás\" " -"kategóriában." #: editor/project_manager.cpp msgid "" @@ -10230,9 +9714,8 @@ msgid "Project Manager" msgstr "ProjektkezelÅ‘" #: editor/project_manager.cpp -#, fuzzy msgid "Projects" -msgstr "Projekt" +msgstr "Projektek" #: editor/project_manager.cpp msgid "Last Modified" @@ -10243,29 +9726,29 @@ msgid "Scan" msgstr "Keresés" #: editor/project_manager.cpp +#, fuzzy msgid "Select a Folder to Scan" -msgstr "" +msgstr "Válasszon egy beolvasandó mappát" #: editor/project_manager.cpp msgid "New Project" -msgstr "" +msgstr "Új projekt" #: editor/project_manager.cpp -#, fuzzy msgid "Remove Missing" -msgstr "Pont eltávolÃtása" +msgstr "Hiányzó eltávolÃtása" #: editor/project_manager.cpp msgid "Templates" -msgstr "" +msgstr "Sablonok" #: editor/project_manager.cpp msgid "Restart Now" -msgstr "" +msgstr "ÚjraindÃtás most" #: editor/project_manager.cpp msgid "Can't run project" -msgstr "" +msgstr "Nem lehet futtatni a projektet" #: editor/project_manager.cpp msgid "" @@ -10282,7 +9765,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "Key " -msgstr "" +msgstr "Kulcs " #: editor/project_settings_editor.cpp msgid "Joy Button" @@ -10294,7 +9777,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "Mouse Button" -msgstr "" +msgstr "Egérgomb" #: editor/project_settings_editor.cpp msgid "" @@ -10303,18 +9786,16 @@ msgid "" msgstr "" #: editor/project_settings_editor.cpp -#, fuzzy msgid "An action with the name '%s' already exists." -msgstr "HIBA: Animáció név már létezik!" +msgstr "" #: editor/project_settings_editor.cpp msgid "Rename Input Action Event" msgstr "" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Change Action deadzone" -msgstr "Animáció Nevének Megváltoztatása:" +msgstr "" #: editor/project_settings_editor.cpp msgid "Add Input Action Event" @@ -10322,7 +9803,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "All Devices" -msgstr "" +msgstr "Minden eszköz" #: editor/project_settings_editor.cpp msgid "Device" @@ -10330,31 +9811,32 @@ msgstr "Eszköz" #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Press a Key..." -msgstr "" +msgstr "Nyomj meg egy gombot..." #: editor/project_settings_editor.cpp +#, fuzzy msgid "Mouse Button Index:" -msgstr "" +msgstr "Egérgomb index:" #: editor/project_settings_editor.cpp msgid "Left Button" -msgstr "" +msgstr "Bal gomb" #: editor/project_settings_editor.cpp msgid "Right Button" -msgstr "" +msgstr "Jobb gomb" #: editor/project_settings_editor.cpp msgid "Middle Button" -msgstr "" +msgstr "KözépsÅ‘ gomb" #: editor/project_settings_editor.cpp msgid "Wheel Up Button" -msgstr "" +msgstr "Felfelé görgetés gomb" #: editor/project_settings_editor.cpp msgid "Wheel Down Button" -msgstr "" +msgstr "Lefelé görgetés gomb" #: editor/project_settings_editor.cpp msgid "Wheel Left Button" @@ -10413,12 +9895,13 @@ msgid "Middle Button." msgstr "KözépsÅ‘ Egérgomb." #: editor/project_settings_editor.cpp +#, fuzzy msgid "Wheel Up." -msgstr "" +msgstr "Felfelé görgetés." #: editor/project_settings_editor.cpp msgid "Wheel Down." -msgstr "" +msgstr "Lefelé görgetés." #: editor/project_settings_editor.cpp msgid "Add Global Property" @@ -10452,16 +9935,15 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "Error saving settings." -msgstr "" +msgstr "Hiba a beállÃtások mentésekor." #: editor/project_settings_editor.cpp msgid "Settings saved OK." -msgstr "" +msgstr "A beállÃtások sikeresen elmentve." #: editor/project_settings_editor.cpp -#, fuzzy msgid "Moved Input Action Event" -msgstr "Pont Mozgatása a Görbén" +msgstr "" #: editor/project_settings_editor.cpp msgid "Override for Feature" @@ -10469,11 +9951,11 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "Add Translation" -msgstr "" +msgstr "FordÃtás hozzáadása" #: editor/project_settings_editor.cpp msgid "Remove Translation" -msgstr "" +msgstr "FordÃtás eltávolÃtása" #: editor/project_settings_editor.cpp msgid "Add Remapped Path" @@ -10528,9 +10010,8 @@ msgid "Action:" msgstr "" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Action" -msgstr "Mozgási Művelet" +msgstr "Művelet" #: editor/project_settings_editor.cpp msgid "Deadzone" @@ -10538,23 +10019,24 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "Device:" -msgstr "" +msgstr "Eszköz:" #: editor/project_settings_editor.cpp msgid "Index:" -msgstr "" +msgstr "Index:" #: editor/project_settings_editor.cpp +#, fuzzy msgid "Localization" -msgstr "" +msgstr "Lokalizáció" #: editor/project_settings_editor.cpp msgid "Translations" -msgstr "" +msgstr "FordÃtások" #: editor/project_settings_editor.cpp msgid "Translations:" -msgstr "" +msgstr "FordÃtások:" #: editor/project_settings_editor.cpp msgid "Remaps" @@ -10577,14 +10059,12 @@ msgid "Locales Filter" msgstr "" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Show All Locales" -msgstr "Csontok Mutatása" +msgstr "" #: editor/project_settings_editor.cpp -#, fuzzy msgid "Show Selected Locales Only" -msgstr "Csak Kiválsztás" +msgstr "" #: editor/project_settings_editor.cpp msgid "Filter mode:" @@ -10620,11 +10100,11 @@ msgstr "" #: editor/property_editor.cpp msgid "File..." -msgstr "" +msgstr "Fájl..." #: editor/property_editor.cpp msgid "Dir..." -msgstr "" +msgstr "Könyvtár..." #: editor/property_editor.cpp msgid "Assign" @@ -10659,55 +10139,53 @@ msgid "Select Method" msgstr "" #: editor/rename_dialog.cpp editor/scene_tree_dock.cpp -#, fuzzy msgid "Batch Rename" -msgstr "Ãtnevezés" +msgstr "Csoportos átnevezés" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Csere: " + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp -#, fuzzy msgid "Use Regular Expressions" -msgstr "Jelenlegi Verzió:" +msgstr "Reguláris kifejezés használata" #: editor/rename_dialog.cpp -#, fuzzy msgid "Advanced Options" -msgstr "Illesztési beállÃtások" +msgstr "Haladó beállÃtások" #: editor/rename_dialog.cpp msgid "Substitute" msgstr "" #: editor/rename_dialog.cpp -#, fuzzy msgid "Node name" -msgstr "Node neve:" +msgstr "Node neve" #: editor/rename_dialog.cpp msgid "Node's parent name, if available" msgstr "" #: editor/rename_dialog.cpp -#, fuzzy msgid "Node type" -msgstr "Node neve:" +msgstr "Node tÃpusa" #: editor/rename_dialog.cpp -#, fuzzy msgid "Current scene name" -msgstr "Még nem mentette az aktuális jelenetet. Megnyitja mindenképp?" +msgstr "Jelenlegi jelenet neve" #: editor/rename_dialog.cpp -#, fuzzy msgid "Root node name" -msgstr "Ãtnevezés" +msgstr "" #: editor/rename_dialog.cpp msgid "" @@ -10720,7 +10198,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10728,9 +10206,8 @@ msgid "Initial value for the counter" msgstr "" #: editor/rename_dialog.cpp -#, fuzzy msgid "Step" -msgstr "Lépés (mp):" +msgstr "Lépés" #: editor/rename_dialog.cpp msgid "Amount by which counter is incremented for each node" @@ -10767,28 +10244,26 @@ msgid "Case" msgstr "" #: editor/rename_dialog.cpp -#, fuzzy msgid "To Lowercase" -msgstr "Mind Kisbetű" +msgstr "Kisbetűssé" #: editor/rename_dialog.cpp -#, fuzzy msgid "To Uppercase" -msgstr "Mind Nagybetű" +msgstr "Nagybetűssé" #: editor/rename_dialog.cpp -#, fuzzy msgid "Reset" -msgstr "NagyÃtás VisszaállÃtása" +msgstr "VisszaállÃtás" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" -msgstr "" +#, fuzzy +msgid "Regular Expression Error:" +msgstr "Reguláris kifejezés használata" #: editor/rename_dialog.cpp #, fuzzy msgid "At character %s" -msgstr "Érvényes karakterek:" +msgstr "A(z) %s karakternél" #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent Node" @@ -10853,9 +10328,8 @@ msgid "Instance Child Scene" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Detach Script" -msgstr "Szkript Létrehozása" +msgstr "Szkript leválasztása" #: editor/scene_tree_dock.cpp msgid "This operation can't be done on the tree root." @@ -10886,19 +10360,16 @@ msgid "Instantiated scenes can't become root" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Make node as Root" -msgstr "Scene mentés" +msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Delete %d nodes and any children?" -msgstr "Node létrehozás" +msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Delete %d nodes?" -msgstr "Node létrehozás" +msgstr "" #: editor/scene_tree_dock.cpp msgid "Delete the root node \"%s\"?" @@ -10909,9 +10380,8 @@ msgid "Delete node \"%s\" and its children?" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Delete node \"%s\"?" -msgstr "Node létrehozás" +msgstr "" #: editor/scene_tree_dock.cpp msgid "Can not perform with the root node." @@ -10938,38 +10408,32 @@ msgid "" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Make Local" -msgstr "Csontok Létrehozása" +msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "New Scene Root" -msgstr "Scene mentés" +msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Create Root Node:" -msgstr "Node létrehozás" +msgstr "Gyökér node létrehozása:" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "2D Scene" -msgstr "Jelenet" +msgstr "2D jelenet" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "3D Scene" -msgstr "Jelenet" +msgstr "3D jelenet" #: editor/scene_tree_dock.cpp msgid "User Interface" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Other Node" -msgstr "Node létrehozás" +msgstr "" #: editor/scene_tree_dock.cpp msgid "Can't operate on nodes from a foreign scene!" @@ -11022,9 +10486,8 @@ msgid "Load As Placeholder" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Open Documentation" -msgstr "Godot online dokumentáció megnyitása" +msgstr "Dokumentáció megnyitása" #: editor/scene_tree_dock.cpp msgid "" @@ -11038,23 +10501,20 @@ msgid "Add Child Node" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Expand/Collapse All" -msgstr "Összes összecsukása" +msgstr "Az összes kinyitása/becsukása" #: editor/scene_tree_dock.cpp msgid "Change Type" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Reparent to New Node" -msgstr "Új %s Létrehozása" +msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Make Scene Root" -msgstr "Scene mentés" +msgstr "" #: editor/scene_tree_dock.cpp msgid "Merge From Scene" @@ -11073,9 +10533,8 @@ msgid "Delete (No Confirm)" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Add/Create a New Node." -msgstr "Új %s Létrehozása" +msgstr "" #: editor/scene_tree_dock.cpp msgid "" @@ -11088,9 +10547,8 @@ msgid "Attach a new or existing script to the selected node." msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Detach the script from the selected node." -msgstr "Kiválasztott Scene(k) példányosÃtása a kiválasztott Node gyermekeként." +msgstr "" #: editor/scene_tree_dock.cpp msgid "Remote" @@ -11105,24 +10563,22 @@ msgid "Clear Inheritance? (No Undo!)" msgstr "" #: editor/scene_tree_editor.cpp -#, fuzzy msgid "Toggle Visible" -msgstr "Rejtett Fájlok MegjelenÃtése" +msgstr "" #: editor/scene_tree_editor.cpp -#, fuzzy msgid "Unlock Node" -msgstr "Egyszeri Node" +msgstr "Node feloldása" #: editor/scene_tree_editor.cpp #, fuzzy msgid "Button Group" -msgstr "Hozzáadás Csoporthoz" +msgstr "Gombcsoport" #: editor/scene_tree_editor.cpp #, fuzzy msgid "(Connecting From)" -msgstr "Kapcsolathiba" +msgstr "(Csatlakozás innen)" #: editor/scene_tree_editor.cpp msgid "Node configuration warning:" @@ -11147,9 +10603,8 @@ msgid "" msgstr "" #: editor/scene_tree_editor.cpp -#, fuzzy msgid "Open Script:" -msgstr "Szkript Futtatása" +msgstr "Szkript megnyitása:" #: editor/scene_tree_editor.cpp msgid "" @@ -11194,38 +10649,33 @@ msgid "Select a Node" msgstr "" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Path is empty." -msgstr "A háló üres!" +msgstr "Az útvonal üres." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Filename is empty." -msgstr "A háló üres!" +msgstr "A fájlnév üres." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Path is not local." -msgstr "Az út nem vezeti a csomópontot!" +msgstr "Az útvonal nem helyi." #: editor/script_create_dialog.cpp #, fuzzy msgid "Invalid base path." -msgstr "Érvénytelen Elérési Út." +msgstr "Érvénytelen alapútvonal." #: editor/script_create_dialog.cpp -#, fuzzy msgid "A directory with the same name exists." -msgstr "Egy fájl vagy mappa már létezik a megadott névvel." +msgstr "Létezik ilyen nevű könyvtár." #: editor/script_create_dialog.cpp msgid "File does not exist." msgstr "A fájl nem létezik." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid extension." -msgstr "Használjon érvényes kiterjesztést." +msgstr "Érvénytelen kiterjesztés." #: editor/script_create_dialog.cpp msgid "Wrong extension chosen." @@ -11252,61 +10702,52 @@ msgid "N/A" msgstr "" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Open Script / Choose Location" -msgstr "Szkript SzerkesztÅ‘ Megnyitása" +msgstr "" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Open Script" -msgstr "Szkript Futtatása" +msgstr "Szkript megnyitása" #: editor/script_create_dialog.cpp msgid "File exists, it will be reused." msgstr "" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid path." -msgstr "Érvénytelen Elérési Út." +msgstr "Érvénytelen útvonal." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Invalid class name." -msgstr "Érvénytelen név." +msgstr "Érvénytelen osztálynév." #: editor/script_create_dialog.cpp msgid "Invalid inherited parent name or path." msgstr "" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Script path/name is valid." -msgstr "Az animációs fa érvényes." +msgstr "A szkript útvonala/neve érvényes." #: editor/script_create_dialog.cpp msgid "Allowed: a-z, A-Z, 0-9, _ and ." msgstr "" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Built-in script (into scene file)." -msgstr "Műveletek Scene fájlokkal." +msgstr "" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Will create a new script file." -msgstr "Új %s Létrehozása" +msgstr "Létrehoz egy új szkriptfájlt." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Will load an existing script file." -msgstr "MeglévÅ‘ Busz Elrendezés betöltése." +msgstr "Egy meglévÅ‘ szkriptfájlt tölt be." #: editor/script_create_dialog.cpp -#, fuzzy msgid "Script file already exists." -msgstr "Már létezik '%s' AutoLoad!" +msgstr "A szkriptfájl már létezik." #: editor/script_create_dialog.cpp msgid "" @@ -11315,19 +10756,16 @@ msgid "" msgstr "" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Class Name:" -msgstr "Osztály:" +msgstr "Osztálynév:" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Template:" -msgstr "Sablon EltávolÃtása" +msgstr "Sablon:" #: editor/script_create_dialog.cpp -#, fuzzy msgid "Built-in Script:" -msgstr "Szkript Futtatása" +msgstr "BeépÃtett szkript:" #: editor/script_create_dialog.cpp msgid "Attach Node Script" @@ -11346,34 +10784,28 @@ msgid "Warning:" msgstr "" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Error:" -msgstr "Hiba!" +msgstr "Hiba:" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "C++ Error" -msgstr "Hiba Másolása" +msgstr "C++ hiba" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "C++ Error:" -msgstr "Hiba Másolása" +msgstr "C++ hiba:" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "C++ Source" -msgstr "Forrás" +msgstr "C++ forrás" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Source:" -msgstr "Forrás" +msgstr "Forrás:" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "C++ Source:" -msgstr "Forrás" +msgstr "C++ forrás:" #: editor/script_editor_debugger.cpp msgid "Stack Trace" @@ -11384,9 +10816,8 @@ msgid "Errors" msgstr "" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Child process connected." -msgstr "Kapcsolat bontva" +msgstr "Gyermekfolyamat csatlakoztatva." #: editor/script_editor_debugger.cpp msgid "Copy Error" @@ -11397,9 +10828,8 @@ msgid "Video RAM" msgstr "" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Skip Breakpoints" -msgstr "Pontok Törlése" +msgstr "Töréspontok kihagyása" #: editor/script_editor_debugger.cpp msgid "Inspect Previous Instance" @@ -11418,9 +10848,8 @@ msgid "Profiler" msgstr "" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Network Profiler" -msgstr "Projekt Exportálása" +msgstr "Hálózati profilkészÃtÅ‘" #: editor/script_editor_debugger.cpp msgid "Monitor" @@ -11447,9 +10876,8 @@ msgid "Total:" msgstr "" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Export list to a CSV file" -msgstr "Projekt Exportálása" +msgstr "" #: editor/script_editor_debugger.cpp msgid "Resource Path" @@ -11492,18 +10920,16 @@ msgid "Export measures as CSV" msgstr "" #: editor/settings_config_dialog.cpp -#, fuzzy msgid "Erase Shortcut" -msgstr "Lassan Ki" +msgstr "" #: editor/settings_config_dialog.cpp msgid "Restore Shortcut" msgstr "" #: editor/settings_config_dialog.cpp -#, fuzzy msgid "Change Shortcut" -msgstr "Horgonyok MódosÃtása" +msgstr "" #: editor/settings_config_dialog.cpp msgid "Editor Settings" @@ -11574,19 +11000,16 @@ msgid "Change Ray Shape Length" msgstr "" #: modules/csg/csg_gizmos.cpp -#, fuzzy msgid "Change Cylinder Radius" -msgstr "Keverési IdÅ‘ MódosÃtása" +msgstr "" #: modules/csg/csg_gizmos.cpp -#, fuzzy msgid "Change Cylinder Height" -msgstr "Keverési IdÅ‘ MódosÃtása" +msgstr "" #: modules/csg/csg_gizmos.cpp -#, fuzzy msgid "Change Torus Inner Radius" -msgstr "Horgonyok és Margók MódosÃtása" +msgstr "" #: modules/csg/csg_gizmos.cpp msgid "Change Torus Outer Radius" @@ -11633,9 +11056,8 @@ msgid "Enabled GDNative Singleton" msgstr "" #: modules/gdnative/gdnative_library_singleton_editor.cpp -#, fuzzy msgid "Disabled GDNative Singleton" -msgstr "FrissÃtési Forgó Kikapcsolása" +msgstr "" #: modules/gdnative/gdnative_library_singleton_editor.cpp msgid "Library" @@ -11714,14 +11136,12 @@ msgid "GridMap Delete Selection" msgstr "" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Fill Selection" -msgstr "Minden kiválasztás" +msgstr "" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Paste Selection" -msgstr "Minden kiválasztás" +msgstr "" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "GridMap Paint" @@ -11788,18 +11208,16 @@ msgid "Cursor Clear Rotation" msgstr "" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Paste Selects" -msgstr "Minden kiválasztás" +msgstr "Kijelölés beillesztése" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Clear Selection" msgstr "" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Fill Selection" -msgstr "Minden kiválasztás" +msgstr "Kijelölés kitöltése" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "GridMap Settings" @@ -11810,9 +11228,8 @@ msgid "Pick Distance:" msgstr "" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Filter meshes" -msgstr "Objektumtulajdonságok." +msgstr "" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Give a MeshLibrary resource to this GridMap to use its meshes." @@ -11943,46 +11360,40 @@ msgid "Set Variable Type" msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Input Port" -msgstr "Bemenet Hozzáadása" +msgstr "Bemeneti port hozzáadása" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Output Port" -msgstr "Bemenet Hozzáadása" +msgstr "Kimeneti port hozzáadása" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Override an existing built-in function." -msgstr "Érvénytelen név. Nem ütközhet egy már meglévÅ‘ beépÃtett tÃpusnévvel." +msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create a new function." -msgstr "Új %s Létrehozása" +msgstr "Új függvény létrehozása." #: modules/visual_script/visual_script_editor.cpp msgid "Variables:" -msgstr "" +msgstr "Változók:" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create a new variable." -msgstr "Új %s Létrehozása" +msgstr "Új változó létrehozása." #: modules/visual_script/visual_script_editor.cpp msgid "Signals:" msgstr "Jelzések:" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create a new signal." -msgstr "Új sokszög létrehozása a semmibÅ‘l." +msgstr "Új jelzés létrehozása." #: modules/visual_script/visual_script_editor.cpp msgid "Name is not a valid identifier:" -msgstr "" +msgstr "A név nem érvényes azonosÃtó:" #: modules/visual_script/visual_script_editor.cpp msgid "Name already in use by another func/var/signal:" @@ -11990,46 +11401,43 @@ msgstr "" #: modules/visual_script/visual_script_editor.cpp msgid "Rename Function" -msgstr "" +msgstr "Függvény átnevezése" #: modules/visual_script/visual_script_editor.cpp msgid "Rename Variable" -msgstr "" +msgstr "Változó átnevezése" #: modules/visual_script/visual_script_editor.cpp msgid "Rename Signal" -msgstr "" +msgstr "Jelzés átnevezése" #: modules/visual_script/visual_script_editor.cpp msgid "Add Function" -msgstr "" +msgstr "Függvény hozzáadása" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Delete input port" -msgstr "Pont eltávolÃtása" +msgstr "Bemeneti port törlése" #: modules/visual_script/visual_script_editor.cpp msgid "Add Variable" -msgstr "" +msgstr "Változó hozzáadása" #: modules/visual_script/visual_script_editor.cpp msgid "Add Signal" -msgstr "" +msgstr "Jelzés hozzáadása" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Remove Input Port" -msgstr "Pont eltávolÃtása" +msgstr "Bemeneti port eltávolÃtása" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Remove Output Port" -msgstr "Pont eltávolÃtása" +msgstr "Kimeneti port eltávolÃtása" #: modules/visual_script/visual_script_editor.cpp msgid "Change Expression" -msgstr "" +msgstr "Kifejezés módosÃtása" #: modules/visual_script/visual_script_editor.cpp msgid "Remove VisualScript Nodes" @@ -12102,19 +11510,16 @@ msgid "Connect Nodes" msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Disconnect Nodes" -msgstr "Kapcsolat bontva" +msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Connect Node Data" -msgstr "Csatlakoztatás Node-hoz:" +msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Connect Node Sequence" -msgstr "Csatlakoztatás Node-hoz:" +msgstr "" #: modules/visual_script/visual_script_editor.cpp msgid "Script already has function '%s'" @@ -12125,9 +11530,8 @@ msgid "Change Input Value" msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Resize Comment" -msgstr "CanvasItem Szerkesztése" +msgstr "" #: modules/visual_script/visual_script_editor.cpp msgid "Can't copy the function node." @@ -12158,58 +11562,52 @@ msgid "Try to only have one sequence input in selection." msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Create Function" -msgstr "Körvonal KészÃtése" +msgstr "Függvény létrehozása" #: modules/visual_script/visual_script_editor.cpp msgid "Remove Function" -msgstr "" +msgstr "Függvény eltávolÃtása" #: modules/visual_script/visual_script_editor.cpp msgid "Remove Variable" -msgstr "" +msgstr "Változó eltávolÃtása" #: modules/visual_script/visual_script_editor.cpp msgid "Editing Variable:" -msgstr "" +msgstr "Változó szerkesztése:" #: modules/visual_script/visual_script_editor.cpp msgid "Remove Signal" -msgstr "" +msgstr "Jelzés eltávolÃtása" #: modules/visual_script/visual_script_editor.cpp msgid "Editing Signal:" -msgstr "" +msgstr "Jelzés szerkesztése:" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Make Tool:" -msgstr "Csontok Létrehozása" +msgstr "" #: modules/visual_script/visual_script_editor.cpp msgid "Members:" msgstr "Tagok:" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Change Base Type:" -msgstr "%s TÃpusának Megváltoztatása" +msgstr "AlaptÃpus módosÃtása:" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Nodes..." -msgstr "%s Hozzáadása..." +msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Add Function..." -msgstr "Ugrás Funkcióra..." +msgstr "Függvény hozzáadása..." #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "function_name" -msgstr "Funkciók:" +msgstr "" #: modules/visual_script/visual_script_editor.cpp msgid "Select or create a function to edit its graph." @@ -12217,7 +11615,7 @@ msgstr "" #: modules/visual_script/visual_script_editor.cpp msgid "Delete Selected" -msgstr "" +msgstr "Kijelöltek törlése" #: modules/visual_script/visual_script_editor.cpp msgid "Find Node Type" @@ -12229,34 +11627,31 @@ msgstr "Node-ok Másolása" #: modules/visual_script/visual_script_editor.cpp msgid "Cut Nodes" -msgstr "" +msgstr "Node-ok kivágása" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Make Function" -msgstr "Funkciók:" +msgstr "" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Refresh Graph" -msgstr "FrissÃtés" +msgstr "Grafikon frissÃtése" #: modules/visual_script/visual_script_editor.cpp -#, fuzzy msgid "Edit Member" -msgstr "Tagok" +msgstr "Tag szerkesztése" #: modules/visual_script/visual_script_flow_control.cpp msgid "Input type not iterable: " -msgstr "" +msgstr "Beviteli tÃpus nem iterálható: " #: modules/visual_script/visual_script_flow_control.cpp msgid "Iterator became invalid" -msgstr "" +msgstr "Az iterátor érvénytelenné vált" #: modules/visual_script/visual_script_flow_control.cpp msgid "Iterator became invalid: " -msgstr "" +msgstr "Az iterátor érvénytelenné vált: " #: modules/visual_script/visual_script_func_nodes.cpp msgid "Invalid index property name." @@ -12264,7 +11659,7 @@ msgstr "" #: modules/visual_script/visual_script_func_nodes.cpp msgid "Base object is not a Node!" -msgstr "" +msgstr "Az alap objektum nem egy node!" #: modules/visual_script/visual_script_func_nodes.cpp msgid "Path does not lead Node!" @@ -12272,23 +11667,23 @@ msgstr "Az út nem vezeti a csomópontot!" #: modules/visual_script/visual_script_func_nodes.cpp msgid "Invalid index property name '%s' in node %s." -msgstr "" +msgstr "Érvénytelen index tulajdonság név: '%s' a(z) %s node-ban." #: modules/visual_script/visual_script_nodes.cpp msgid ": Invalid argument of type: " -msgstr "" +msgstr ": Érvénytelen tÃpusargumentum: " #: modules/visual_script/visual_script_nodes.cpp msgid ": Invalid arguments: " -msgstr "" +msgstr ": Érvénytelen argumentumok: " #: modules/visual_script/visual_script_nodes.cpp msgid "VariableGet not found in script: " -msgstr "" +msgstr "VariableGet nem található a szkriptben: " #: modules/visual_script/visual_script_nodes.cpp msgid "VariableSet not found in script: " -msgstr "" +msgstr "VariableSet nem található a szkriptben: " #: modules/visual_script/visual_script_nodes.cpp msgid "Custom node has no _step() method, can't process graph." @@ -12301,9 +11696,8 @@ msgid "" msgstr "" #: modules/visual_script/visual_script_property_selector.cpp -#, fuzzy msgid "Search VisualScript" -msgstr "Keresés Súgóban" +msgstr "" #: modules/visual_script/visual_script_property_selector.cpp msgid "Get %s" @@ -12376,9 +11770,8 @@ msgid "Invalid public key for APK expansion." msgstr "" #: platform/android/export/export.cpp -#, fuzzy msgid "Invalid package name:" -msgstr "Érvénytelen név." +msgstr "Érvénytelen csomagnév:" #: platform/android/export/export.cpp msgid "" @@ -12447,9 +11840,8 @@ msgid "App Store Team ID not specified - cannot configure the project." msgstr "" #: platform/iphone/export/export.cpp -#, fuzzy msgid "Invalid Identifier:" -msgstr "Érvénytelen betűtÃpus méret." +msgstr "Érvénytelen azonosÃtó:" #: platform/iphone/export/export.cpp msgid "Required icon is not specified in the preset." @@ -12494,32 +11886,30 @@ msgstr "" #: platform/uwp/export/export.cpp #, fuzzy msgid "Invalid package short name." -msgstr "Érvénytelen név." +msgstr "Érvénytelen rövid csomagnév." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid package unique name." -msgstr "Érvénytelen név." +msgstr "Érvénytelen egyedi csomagnév." #: platform/uwp/export/export.cpp #, fuzzy msgid "Invalid package publisher display name." -msgstr "Érvénytelen név." +msgstr "Érvénytelen csomagközzétevÅ‘ megjelenÃtendÅ‘ neve." #: platform/uwp/export/export.cpp #, fuzzy msgid "Invalid product GUID." -msgstr "Érvénytelen projektnév." +msgstr "Érvénytelen termékazonosÃtó." #: platform/uwp/export/export.cpp #, fuzzy msgid "Invalid publisher GUID." -msgstr "Érvénytelen Elérési Út." +msgstr "Érvénytelen közzétevÅ‘i GUID." #: platform/uwp/export/export.cpp -#, fuzzy msgid "Invalid background color." -msgstr "Érvénytelen név." +msgstr "Érvénytelen háttérszÃn." #: platform/uwp/export/export.cpp msgid "Invalid Store Logo image dimensions (should be 50x50)." @@ -12810,6 +12200,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12910,43 +12305,36 @@ msgid "On BlendTree node '%s', animation not found: '%s'" msgstr "" #: scene/animation/animation_blend_tree.cpp -#, fuzzy msgid "Animation not found: '%s'" -msgstr "Animációs Eszközök" +msgstr "Az animáció nem található: '%s'" #: scene/animation/animation_tree.cpp msgid "In node '%s', invalid animation: '%s'." msgstr "" #: scene/animation/animation_tree.cpp -#, fuzzy msgid "Invalid animation: '%s'." -msgstr "HIBA: Érvénytelen animáció név!" +msgstr "Érvénytelen animáció: '%s'." #: scene/animation/animation_tree.cpp -#, fuzzy msgid "Nothing connected to input '%s' of node '%s'." -msgstr "'%s' Lecsatlakoztatása '%s'-ról" +msgstr "" #: scene/animation/animation_tree.cpp msgid "No root AnimationNode for the graph is set." msgstr "" #: scene/animation/animation_tree.cpp -#, fuzzy msgid "Path to an AnimationPlayer node containing animations is not set." msgstr "" -"Válasszon egy AnimationPlayer-t a Jelenetfából, hogy animációkat " -"szerkeszthessen." #: scene/animation/animation_tree.cpp msgid "Path set for AnimationPlayer does not lead to an AnimationPlayer node." msgstr "" #: scene/animation/animation_tree.cpp -#, fuzzy msgid "The AnimationPlayer root node is not a valid node." -msgstr "Az animációs fa érvénytelen." +msgstr "" #: scene/animation/animation_tree_player.cpp msgid "This node has been deprecated. Use AnimationTree instead." @@ -12998,7 +12386,7 @@ msgstr "Figyelem!" #: scene/gui/dialogs.cpp msgid "Please Confirm..." -msgstr "Kérem ErÅ‘sÃtse Meg..." +msgstr "Kérjük erÅ‘sÃtse meg..." #: scene/gui/popup.cpp msgid "" @@ -13047,17 +12435,15 @@ msgstr "" #: scene/resources/visual_shader_nodes.cpp #, fuzzy msgid "Invalid source for preview." -msgstr "Érvénytelen betűtÃpus méret." +msgstr "Érvénytelen forrás az elÅ‘nézethez." #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid source for shader." -msgstr "Érvénytelen betűtÃpus méret." +msgstr "" #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Invalid comparison function for that type." -msgstr "Érvénytelen betűtÃpus méret." +msgstr "" #: servers/visual/shader_language.cpp msgid "Assignment to function." @@ -13075,6 +12461,14 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Exportáláskor vagy telepÃtéskor az Ãgy kapott futtatható program " +#~ "megpróbál ennek a számÃtógépnek az IP-jéhez csatlakozni távoli " +#~ "hibakeresés érdekében." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "A jelenlegi Scene soha nem volt még mentve, mentse el a futtatás elÅ‘tt." diff --git a/editor/translations/id.po b/editor/translations/id.po index 9bd5244ee5..7e94f233c1 100644 --- a/editor/translations/id.po +++ b/editor/translations/id.po @@ -551,6 +551,7 @@ msgid "Seconds" msgstr "Detik" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -729,7 +730,7 @@ msgstr "Kasus Kecocokan" msgid "Whole Words" msgstr "Semua Kata" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Ganti" @@ -921,6 +922,11 @@ msgid "Signals" msgstr "Sinyal" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filter tile" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Anda yakin ingin menghapus semua hubungan dari sinyal ini?" @@ -958,7 +964,7 @@ msgid "Recent:" msgstr "Saat ini:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Cari:" @@ -1648,16 +1654,17 @@ msgid "Scene Tree Editing" msgstr "Menyunting Pohon Skena" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Dok Impor" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Dok Node" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Dok Impor dan Berkas Sistem" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Berkas Sistem" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Dok Impor" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1921,7 +1928,7 @@ msgstr "Direktori-direktori & File-file:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Pratinjau:" @@ -2801,24 +2808,28 @@ msgstr "Deploy dengan Awakutu Jarak Jauh" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Saat mengekspor atau mendeploy, hasil executable akan mencoba terhubung ke " -"IP komputer untuk diawakutu." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Deploy Kecil dengan Jaringan FS" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Ketika opsi ini aktif, ekspor atau deploy akan menghasilkan minimal " "executable.\n" @@ -2831,9 +2842,10 @@ msgid "Visible Collision Shapes" msgstr "Collision Shapes Terlihat" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Collision shapes dan raycast nodes (untuk 2D dan 3D) akan terlihat pada saat " "permainan berjalan jika opsi ini aktif." @@ -2843,23 +2855,26 @@ msgid "Visible Navigation" msgstr "Navigasi Terlihat" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Navigasi meshes dan poligon akan terlihat saat game berjalan jika opsi ini " "aktif." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Sinkronkan Perubahan Skena" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Ketika opsi ini aktif, perubahan yang dibuat pada skena melalui editor akan " "direplika pada gim yang sedang berjalan.\n" @@ -2867,15 +2882,17 @@ msgstr "" "berkas sistem jaringan." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Sinkronkan Perubahan Script" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Ketika opsi ini aktif, perubahan script yang tersimpan akan di muat kembali " "pada permainan yang sedang berjalan.\n" @@ -2939,7 +2956,7 @@ msgstr "Bantuan" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Cari" @@ -3357,9 +3374,11 @@ msgid "Add Key/Value Pair" msgstr "Tambahkan pasangan Key/Value" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Tidak ada preset ekspor yang bisa digunakan untuk platform ini.\n" "Mohon tambahkan preset yang bisa digunakan di menu ekspor." @@ -5119,7 +5138,7 @@ msgid "Bake Lightmaps" msgstr "Panggang Lightmaps" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Pratinjau" @@ -7766,7 +7785,8 @@ msgid "New Animation" msgstr "Animasi Baru" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "Kecepatan (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10341,11 +10361,18 @@ msgid "Batch Rename" msgstr "Ubah Nama Massal" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Ganti: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "Awalan" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "Akhiran" #: editor/rename_dialog.cpp @@ -10393,7 +10420,8 @@ msgid "Per-level Counter" msgstr "Penghitung per Level" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "Jika diatur, penghitung akan dimulai ulang untuk setiap grup node anak" #: editor/rename_dialog.cpp @@ -10453,7 +10481,8 @@ msgid "Reset" msgstr "Reset" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "Kesalahan Ekspresi Reguler" #: editor/rename_dialog.cpp @@ -12532,6 +12561,11 @@ msgstr "" "GIProbes tidak didukung oleh driver video GLES2.\n" "Gunakan BakedLightmap sebagai gantinya." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12831,6 +12865,16 @@ msgstr "Variasi hanya bisa ditetapkan dalam fungsi vertex." msgid "Constants cannot be modified." msgstr "Konstanta tidak dapat dimodifikasi." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Dok Impor dan Berkas Sistem" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Saat mengekspor atau mendeploy, hasil executable akan mencoba terhubung " +#~ "ke IP komputer untuk diawakutu." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "Skena saat ini belum pernah disimpan, harap simpan terlebih dahulu " diff --git a/editor/translations/is.po b/editor/translations/is.po index 7b4ed6415b..b39913e3c6 100644 --- a/editor/translations/is.po +++ b/editor/translations/is.po @@ -536,6 +536,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -720,7 +721,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "" @@ -910,6 +911,10 @@ msgid "Signals" msgstr "" #: editor/connections_dialog.cpp +msgid "Filter signals" +msgstr "" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -947,7 +952,7 @@ msgid "Recent:" msgstr "" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "" @@ -1618,15 +1623,15 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" +msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Node Dock" +msgid "FileSystem Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1891,7 +1896,7 @@ msgstr "" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2720,22 +2725,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2744,8 +2753,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2754,32 +2763,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2840,7 +2849,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3242,7 +3251,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -4983,7 +4993,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7587,7 +7597,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10033,11 +10043,15 @@ msgid "Batch Rename" msgstr "Endurnefning Anim track" #: editor/rename_dialog.cpp -msgid "Prefix" +msgid "Replace:" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10083,7 +10097,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10141,7 +10155,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -12089,6 +12103,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/it.po b/editor/translations/it.po index ba09df0418..b16db7243d 100644 --- a/editor/translations/it.po +++ b/editor/translations/it.po @@ -59,8 +59,8 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-09-08 11:40+0000\n" -"Last-Translator: Micila Micillotto <micillotto@gmail.com>\n" +"PO-Revision-Date: 2020-09-22 03:23+0000\n" +"Last-Translator: Mirko <miknsop@gmail.com>\n" "Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/" "godot/it/>\n" "Language: it\n" @@ -579,6 +579,7 @@ msgid "Seconds" msgstr "Secondi" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -731,7 +732,7 @@ msgstr "Cambia valore array" #: editor/code_editor.cpp msgid "Go to Line" -msgstr "Va' alla linea" +msgstr "Vai alla linea" #: editor/code_editor.cpp msgid "Line Number:" @@ -757,7 +758,7 @@ msgstr "Distingui maiuscole" msgid "Whole Words" msgstr "Parole intere" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Sostituisci" @@ -950,6 +951,11 @@ msgid "Signals" msgstr "Segnali" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtra tiles" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Sei sicuro di voler rimuovere tutte le connessioni da questo segnale?" @@ -987,7 +993,7 @@ msgid "Recent:" msgstr "Recenti:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Cerca:" @@ -1678,16 +1684,17 @@ msgid "Scene Tree Editing" msgstr "Editor delle scene" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Importa" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Nodo" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Filesystem e dock di importazione" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Filesystem" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Importa" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1883,11 +1890,11 @@ msgstr "Torna indietro" #: editor/editor_file_dialog.cpp msgid "Go Forward" -msgstr "Va' avanti" +msgstr "Vai avanti" #: editor/editor_file_dialog.cpp msgid "Go Up" -msgstr "Va' su" +msgstr "Vai su" #: editor/editor_file_dialog.cpp msgid "Toggle Hidden Files" @@ -1951,7 +1958,7 @@ msgstr "File e cartelle:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Anteprima:" @@ -2753,7 +2760,7 @@ msgstr "Apri recente" #: editor/editor_node.cpp msgid "Save Scene" -msgstr "Salva Scena" +msgstr "Salva scena" #: editor/editor_node.cpp msgid "Save All Scenes" @@ -2841,25 +2848,28 @@ msgstr "Distribuisci con Debug remoto" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"L'eseguibile, dopo l'esportazione o la distribuzione, attenterà di " -"connettersi con l'indirizzo IP di questo computer per farsi eseguire il " -"debug." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Piccola distribuzione con la rete FS" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Quando questa opzione è abilitata, l'esportazione o distribuzione produrrà " "un eseguibile minimale.\n" @@ -2873,9 +2883,10 @@ msgid "Visible Collision Shapes" msgstr "Forme di collisione visibili" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Le forme di collisione e i nodi di raycast (per il 2D e 3D) saranno visibili " "nel gioco in esecuzione se l'opzione è attiva." @@ -2885,23 +2896,26 @@ msgid "Visible Navigation" msgstr "Navigazione Visibile" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Le mesh e i poligoni di navigazione saranno visibili nel gioco in esecuzione " "se l'opzione è attiva." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Sincronizza cambiamenti scena" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Quando questa opzione è attiva, qualsiasi cambiamento fatto alla scena " "nell'editor sarà replicato nel gioco in esecuzione.\n" @@ -2909,15 +2923,17 @@ msgstr "" "filesystem in rete." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Sincronizza cambiamenti script" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Quando questa opzione è attiva, qualsiasi script salvato verrà ricaricato " "nel gioco in esecuzione.\n" @@ -2982,7 +2998,7 @@ msgstr "Aiuto" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Cerca" @@ -3037,7 +3053,7 @@ msgstr "Esegui la scena in modifica." #: editor/editor_node.cpp msgid "Play Scene" -msgstr "Avvia Scena" +msgstr "Esegui scena" #: editor/editor_node.cpp msgid "Play custom scene" @@ -3045,7 +3061,7 @@ msgstr "Esegui scena personalizzata" #: editor/editor_node.cpp msgid "Play Custom Scene" -msgstr "Avvia Scena Personalizzata" +msgstr "Avvia scena personalizzata" #: editor/editor_node.cpp msgid "Changing the video driver requires restarting the editor." @@ -3171,11 +3187,11 @@ msgstr "Apri Editor 2D" #: editor/editor_node.cpp msgid "Open 3D Editor" -msgstr "Apri editor 3D" +msgstr "Apri Editor 3D" #: editor/editor_node.cpp msgid "Open Script Editor" -msgstr "Apri editor degli script" +msgstr "Apri Editor degli script" #: editor/editor_node.cpp editor/project_manager.cpp msgid "Open Asset Library" @@ -3402,9 +3418,11 @@ msgid "Add Key/Value Pair" msgstr "Aggiungi Coppia Chiave/Valore" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Non sono stati trovati dei modelli di export eseguibili per questa " "piattaforma.\n" @@ -5181,7 +5199,7 @@ msgid "Bake Lightmaps" msgstr "Preprocessa Lightmaps" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Anteprima" @@ -5616,7 +5634,7 @@ msgstr "Vista" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Always Show Grid" -msgstr "Mostra Sempre Griglia" +msgstr "Mostra sempre Griglia" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Show Helpers" @@ -7018,7 +7036,7 @@ msgstr "Linea" #: editor/plugins/script_text_editor.cpp msgid "Go to Function" -msgstr "Va' alla funzione" +msgstr "Vai alla funzione" #: editor/plugins/script_text_editor.cpp msgid "Only resources from filesystem can be dropped." @@ -7842,7 +7860,8 @@ msgid "New Animation" msgstr "Nuova Animazione" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "Velocità (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -8271,7 +8290,7 @@ msgstr "Modalità Regione" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Collision Mode" -msgstr "Modalità di collisione" +msgstr "Modalità Collisioni" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Occlusion Mode" @@ -8287,7 +8306,7 @@ msgstr "Modalità Bitmask" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Priority Mode" -msgstr "Modalità Prioritaria" +msgstr "Modalità Priorità " #: editor/plugins/tile_set_editor_plugin.cpp msgid "Icon Mode" @@ -10423,11 +10442,18 @@ msgid "Batch Rename" msgstr "Rinomina in blocco" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Sostituisci: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "Prefisso" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "Suffisso" #: editor/rename_dialog.cpp @@ -10475,7 +10501,8 @@ msgid "Per-level Counter" msgstr "Contatore per Livello" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "Se impostato, il contatore si riavvia per ogni gruppo di nodi figlio" #: editor/rename_dialog.cpp @@ -10535,7 +10562,8 @@ msgid "Reset" msgstr "Reset" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "Errore Espressione Regolare" #: editor/rename_dialog.cpp @@ -11926,7 +11954,7 @@ msgstr "Seleziona o crea una funzione per modificarne il grafico." #: modules/visual_script/visual_script_editor.cpp msgid "Delete Selected" -msgstr "Elimina Selezionati" +msgstr "Elimina selezionati" #: modules/visual_script/visual_script_editor.cpp msgid "Find Node Type" @@ -12639,6 +12667,11 @@ msgstr "" "Le GIProbes non sono supportate dal driver video GLES2.\n" "In alternativa, usa una BakedLightmap." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12945,6 +12978,17 @@ msgstr "Varyings può essere assegnato soltanto nella funzione del vertice." msgid "Constants cannot be modified." msgstr "Le constanti non possono essere modificate." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Filesystem e dock di importazione" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "L'eseguibile, dopo l'esportazione o la distribuzione, attenterà di " +#~ "connettersi con l'indirizzo IP di questo computer per farsi eseguire il " +#~ "debug." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "La scena attuale non è mai stata salvata, si prega di salvarla prima di " diff --git a/editor/translations/ja.po b/editor/translations/ja.po index bdab275f0f..d1a368346d 100644 --- a/editor/translations/ja.po +++ b/editor/translations/ja.po @@ -36,7 +36,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-08-28 13:09+0000\n" +"PO-Revision-Date: 2020-09-22 03:23+0000\n" "Last-Translator: Wataru Onuki <bettawat@yahoo.co.jp>\n" "Language-Team: Japanese <https://hosted.weblate.org/projects/godot-engine/" "godot/ja/>\n" @@ -45,7 +45,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.2.1-dev\n" +"X-Generator: Weblate 4.3-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -557,6 +557,7 @@ msgid "Seconds" msgstr "秒" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "フレームレート(FPS)" @@ -608,7 +609,7 @@ msgstr "å‰ã®ã‚¹ãƒ†ãƒƒãƒ—ã¸" #: editor/animation_track_editor.cpp msgid "Optimize Animation" -msgstr "アニメーションã®æœ€é©åŒ–" +msgstr "アニメーションを最é©åŒ–" #: editor/animation_track_editor.cpp msgid "Clean-Up Animation" @@ -735,7 +736,7 @@ msgstr "大文å—å°æ–‡å—を区別ã™ã‚‹" msgid "Whole Words" msgstr "å˜èªžå…¨ä½“" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "ç½®æ›" @@ -926,6 +927,11 @@ msgid "Signals" msgstr "シグナル" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "タイルを絞り込む" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "ã“ã®ã‚·ã‚°ãƒŠãƒ«ã‹ã‚‰ã™ã¹ã¦ã®æŽ¥ç¶šã‚’除去ã—ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹ï¼Ÿ" @@ -963,7 +969,7 @@ msgid "Recent:" msgstr "最近:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "検索:" @@ -1167,14 +1173,12 @@ msgid "Gold Sponsors" msgstr "ゴールドスãƒãƒ³ã‚µãƒ¼" #: editor/editor_about.cpp -#, fuzzy msgid "Silver Sponsors" -msgstr "シルãƒãƒ¼ãƒ‰ãƒŠãƒ¼" +msgstr "シルãƒãƒ¼ã‚¹ãƒãƒ³ã‚µãƒ¼" #: editor/editor_about.cpp -#, fuzzy msgid "Bronze Sponsors" -msgstr "ブãƒãƒ³ã‚ºãƒ‰ãƒŠãƒ¼" +msgstr "ブãƒãƒ³ã‚ºã‚¹ãƒãƒ³ã‚µãƒ¼" #: editor/editor_about.cpp msgid "Mini Sponsors" @@ -1653,16 +1657,17 @@ msgid "Scene Tree Editing" msgstr "シーンツリーã®ç·¨é›†" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "インãƒãƒ¼ãƒˆãƒ‰ãƒƒã‚¯" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "ノードドック" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "ファイルシステムã¨ã‚¤ãƒ³ãƒãƒ¼ãƒˆãƒ‰ãƒƒã‚¯" +#, fuzzy +msgid "FileSystem Dock" +msgstr "ファイルシステム" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "インãƒãƒ¼ãƒˆãƒ‰ãƒƒã‚¯" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1927,7 +1932,7 @@ msgstr "ディレクトリã¨ãƒ•ã‚¡ã‚¤ãƒ«:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "プレビュー:" @@ -2805,24 +2810,28 @@ msgstr "リモートデãƒãƒƒã‚°ã§ãƒ‡ãƒ—ãƒã‚¤" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"エクスãƒãƒ¼ãƒˆã¾ãŸã¯ãƒ‡ãƒ—ãƒã‚¤ã‚’è¡Œã†å ´åˆã€ç”Ÿæˆã•ã‚ŒãŸå®Ÿè¡Œãƒ•ã‚¡ã‚¤ãƒ«ã¯ãƒ‡ãƒãƒƒã‚°ã®ãŸã‚" -"ã«ã€ã“ã®ã‚³ãƒ³ãƒ”ューターã®IPã«æŽ¥ç¶šã‚’試ã¿ã¾ã™ã€‚" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã§ã‚¹ãƒ¢ãƒ¼ãƒ«ãƒ‡ãƒ—ãƒã‚¤" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "ã“ã®ã‚ªãƒ—ションを有効ã«ã™ã‚‹ã¨ã€ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã¾ãŸã¯ãƒ‡ãƒ—ãƒã‚¤æ™‚ã«æœ€å°é™ã®å®Ÿè¡Œå¯èƒ½" "ファイルãŒç”Ÿæˆã•ã‚Œã¾ã™ã€‚\n" @@ -2836,9 +2845,10 @@ msgid "Visible Collision Shapes" msgstr "コリジョン形状ã®è¡¨ç¤º" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "ã“ã®ã‚ªãƒ—ションを有効ã«ã™ã‚‹ã¨ã€ã‚³ãƒªã‚¸ãƒ§ãƒ³å½¢çŠ¶ã¨ãƒ¬ã‚¤ã‚ャストノードãŒã€ã‚²ãƒ¼ãƒ 実" "è¡Œä¸ã«ã‚‚表示ã•ã‚Œã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚" @@ -2848,38 +2858,43 @@ msgid "Visible Navigation" msgstr "ナビゲーションã®è¡¨ç¤º" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "ã“ã®ã‚ªãƒ—ションを有効ã«ã™ã‚‹ã¨ã€ãƒŠãƒ“ゲーションメッシュãŒã€ã‚²ãƒ¼ãƒ 実行ä¸ã«ã‚‚表示" "ã•ã‚Œã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "シーンã®å¤‰æ›´ã‚’åŒæœŸ" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "ã“ã®ã‚ªãƒ—ションを有効ã«ã™ã‚‹ã¨ã€ã‚¨ãƒ‡ã‚£ã‚¿ã‹ã‚‰ã‚·ãƒ¼ãƒ³ã«åŠ ãˆã‚‰ã‚ŒãŸå¤‰æ›´ãŒã€å®Ÿè¡Œä¸ã®" "ゲームã«åæ˜ ã•ã‚Œã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚\n" "リモート実行ã®å ´åˆã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ を使ã†ã¨ã‚ˆã‚ŠåŠ¹æžœçš„ã§ã™ã€‚" #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "スクリプトã®å¤‰æ›´ã‚’åŒæœŸ" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "ã“ã®ã‚ªãƒ—ションを有効ã«ã™ã‚‹ã¨ã€ä¿å˜ã—ãŸã‚¹ã‚¯ãƒªãƒ—トãŒã€å®Ÿè¡Œä¸ã®ã‚²ãƒ¼ãƒ ã«åæ˜ ã•ã‚Œ" "るよã†ã«ãªã‚Šã¾ã™ã€‚\n" @@ -2942,7 +2957,7 @@ msgstr "ヘルプ" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "検索" @@ -3360,9 +3375,11 @@ msgid "Add Key/Value Pair" msgstr "ã‚ー/値ã®ãƒšã‚¢ã‚’è¿½åŠ " #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "ã“ã®ãƒ—ラットフォームã§å®Ÿè¡Œå¯èƒ½ãªã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆãƒ—リセットãŒã‚ã‚Šã¾ã›ã‚“。\n" "エクスãƒãƒ¼ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã«å®Ÿè¡Œå¯èƒ½ãªãƒ—ãƒªã‚»ãƒƒãƒˆã‚’è¿½åŠ ã—ã¦ãã ã•ã„。" @@ -5122,7 +5139,7 @@ msgid "Bake Lightmaps" msgstr "ライトマップを焼ã込む" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "プレビュー" @@ -7766,7 +7783,8 @@ msgid "New Animation" msgstr "æ–°è¦ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "速度(FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10327,11 +10345,18 @@ msgid "Batch Rename" msgstr "åå‰ã®ä¸€æ‹¬å¤‰æ›´" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "ç½®æ›: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "プレフィックス" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "サフィックス" #: editor/rename_dialog.cpp @@ -10379,7 +10404,8 @@ msgid "Per-level Counter" msgstr "レベルã”ã¨ã®ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "è¨å®šã™ã‚‹ã¨ã€åノードã®ã‚°ãƒ«ãƒ¼ãƒ—ã”ã¨ã«ã‚«ã‚¦ãƒ³ã‚¿ãŒå†èµ·å‹•ã—ã¾ã™" #: editor/rename_dialog.cpp @@ -10439,7 +10465,8 @@ msgid "Reset" msgstr "リセット" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "æ£è¦è¡¨ç¾ã‚¨ãƒ©ãƒ¼" #: editor/rename_dialog.cpp @@ -12518,6 +12545,11 @@ msgstr "" "GIProbesã¯GLES2ビデオドライãƒã§ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。\n" "代ã‚ã‚Šã«BakedLightmapを使用ã—ã¦ãã ã•ã„。" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "90度を超ãˆã‚‹è§’度ã®ã‚¹ãƒãƒƒãƒˆãƒ©ã‚¤ãƒˆã¯ã€ã‚·ãƒ£ãƒ‰ã‚¦ã‚’投影ã§ãã¾ã›ã‚“。" @@ -12822,6 +12854,16 @@ msgstr "Varying変数ã¯é ‚点関数ã«ã®ã¿å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã msgid "Constants cannot be modified." msgstr "定数ã¯å¤‰æ›´ã§ãã¾ã›ã‚“。" +#~ msgid "FileSystem and Import Docks" +#~ msgstr "ファイルシステムã¨ã‚¤ãƒ³ãƒãƒ¼ãƒˆãƒ‰ãƒƒã‚¯" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "エクスãƒãƒ¼ãƒˆã¾ãŸã¯ãƒ‡ãƒ—ãƒã‚¤ã‚’è¡Œã†å ´åˆã€ç”Ÿæˆã•ã‚ŒãŸå®Ÿè¡Œãƒ•ã‚¡ã‚¤ãƒ«ã¯ãƒ‡ãƒãƒƒã‚°ã®ãŸ" +#~ "ã‚ã«ã€ã“ã®ã‚³ãƒ³ãƒ”ューターã®IPã«æŽ¥ç¶šã‚’試ã¿ã¾ã™ã€‚" + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "ç¾åœ¨ã®ã‚·ãƒ¼ãƒ³ã¯ä¿å˜ã•ã‚Œã¾ã›ã‚“ã§ã—ãŸã€‚実行ã™ã‚‹å‰ã«ä¿å˜ã—ã¦ãã ã•ã„。" diff --git a/editor/translations/ka.po b/editor/translations/ka.po index 7ec9bbd88a..a59a42333f 100644 --- a/editor/translations/ka.po +++ b/editor/translations/ka.po @@ -552,6 +552,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -738,7 +739,7 @@ msgstr "სáƒáƒ¥áƒ›áƒ˜áƒ¡ დáƒáƒ›áƒ—ხვევáƒ" msgid "Whole Words" msgstr "მთლიáƒáƒœáƒ˜ სიტყვები" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "ჩáƒáƒœáƒáƒªáƒ•áƒšáƒ”ბáƒ" @@ -941,6 +942,11 @@ msgid "Signals" msgstr "სიგნáƒáƒšáƒ”ბი" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "დáƒáƒ›áƒáƒ™áƒáƒ•áƒ¨áƒ˜áƒ ებელი სიგნáƒáƒšáƒ˜:" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -979,7 +985,7 @@ msgid "Recent:" msgstr "ბáƒáƒšáƒ:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "ძებნáƒ:" @@ -1674,15 +1680,15 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" +msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Node Dock" +msgid "FileSystem Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1957,7 +1963,7 @@ msgstr "" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2802,22 +2808,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2826,8 +2836,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2836,32 +2846,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2922,7 +2932,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3326,7 +3336,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -5105,7 +5116,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7755,7 +7766,7 @@ msgid "New Animation" msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ áƒáƒžáƒ¢áƒ˜áƒ›áƒ˜áƒ–áƒáƒªáƒ˜áƒ" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10233,11 +10244,16 @@ msgid "Batch Rename" msgstr "სáƒáƒ¥áƒ›áƒ˜áƒ¡ დáƒáƒ›áƒ—ხვევáƒ" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "ჩáƒáƒœáƒáƒªáƒ•áƒšáƒ”ბáƒ" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10283,7 +10299,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10343,7 +10359,7 @@ msgid "Reset" msgstr "ზუმის სáƒáƒ¬áƒ§áƒ˜áƒ¡áƒ–ე დáƒáƒ§áƒ”ნებáƒ" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -12325,6 +12341,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/ko.po b/editor/translations/ko.po index 83853be57c..d39f172539 100644 --- a/editor/translations/ko.po +++ b/editor/translations/ko.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-07-31 03:47+0000\n" +"PO-Revision-Date: 2020-09-16 18:09+0000\n" "Last-Translator: Ch. <ccwpc@hanmail.net>\n" "Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/" "godot/ko/>\n" @@ -32,7 +32,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.2-dev\n" +"X-Generator: Weblate 4.3-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -541,6 +541,7 @@ msgid "Seconds" msgstr "ì´ˆ" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "초당 í”„ë ˆìž„" @@ -719,7 +720,7 @@ msgstr "ëŒ€ì†Œë¬¸ìž êµ¬ë¶„" msgid "Whole Words" msgstr "단어 단위로" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "바꾸기" @@ -912,6 +913,11 @@ msgid "Signals" msgstr "시그ë„" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "íƒ€ì¼ í•„í„°" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "ì´ ì‹œê·¸ë„ì˜ ëª¨ë“ ì—°ê²°ì„ ì‚ì œí• ê¹Œìš”?" @@ -949,7 +955,7 @@ msgid "Recent:" msgstr "최근 기ë¡:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "검색:" @@ -1153,14 +1159,12 @@ msgid "Gold Sponsors" msgstr "골드 스í°ì„œ" #: editor/editor_about.cpp -#, fuzzy msgid "Silver Sponsors" -msgstr "실버 기부ìž" +msgstr "실버 스í°ì„œ" #: editor/editor_about.cpp -#, fuzzy msgid "Bronze Sponsors" -msgstr "ë¸Œë¡ ì¦ˆ 기부ìž" +msgstr "ë¸Œë¡ ì¦ˆ 스í°ì„œ" #: editor/editor_about.cpp msgid "Mini Sponsors" @@ -1637,16 +1641,17 @@ msgid "Scene Tree Editing" msgstr "씬 트리 편집" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "ë… ê°€ì ¸ì˜¤ê¸°" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "노드 ë„킹" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "íŒŒì¼ ì‹œìŠ¤í…œê³¼ ê°€ì ¸ì˜¤ê¸° ë…" +#, fuzzy +msgid "FileSystem Dock" +msgstr "íŒŒì¼ ì‹œìŠ¤í…œ" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "ë… ê°€ì ¸ì˜¤ê¸°" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1910,7 +1915,7 @@ msgstr "ë””ë ‰í† ë¦¬ & 파ì¼:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "미리 보기:" @@ -2780,24 +2785,28 @@ msgstr "ì›ê²© 디버그와 함께 ë°°í¬" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"내보내거나 ë°°í¬í• ë•Œ, ê²°ê³¼ 실행 파ì¼ì€ ë””ë²„ê¹…ì„ ìœ„í•´ ì´ ì»´í“¨í„°ì˜ IP와 ì—°ê²°ì„ " -"ì‹œë„í• ê²ƒìž…ë‹ˆë‹¤." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "ë„¤íŠ¸ì›Œí¬ íŒŒì¼ ì‹œìŠ¤í…œì„ ì‚¬ìš©í•˜ì—¬ 작게 ë°°í¬" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "ì´ ì„¤ì •ì„ ì¼œë©´, 내보내거나 ë°°í¬í• ë•Œ ìµœì†Œí•œì˜ ì‹¤í–‰ 파ì¼ì„ 만ë“니다.\n" "ì´ ê²½ìš°, 실행 파ì¼ì´ ë„¤íŠ¸ì›Œí¬ ë„ˆë¨¸ì— ìžˆëŠ” íŽ¸ì§‘ê¸°ì˜ íŒŒì¼ ì‹œìŠ¤í…œì„ ì‚¬ìš©í•©ë‹ˆ" @@ -2810,9 +2819,10 @@ msgid "Visible Collision Shapes" msgstr "ì¶©ëŒ ëª¨ì–‘ ë³´ì´ê¸°" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "ì´ ì„¤ì •ì„ ì¼œë©´ ê²Œìž„ì„ ì‹¤í–‰í•˜ëŠ” ë™ì•ˆ (2D와 3Dìš©) Collision 모양과 Raycast 노드" "ê°€ ë³´ì´ê²Œ ë©ë‹ˆë‹¤." @@ -2822,23 +2832,26 @@ msgid "Visible Navigation" msgstr "내비게ì´ì…˜ ë³´ì´ê¸°" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "ì´ ì„¤ì •ì„ ì¼œë©´, ê²Œìž„ì„ ì‹¤í–‰í•˜ëŠ” ë™ì•ˆ Navigation 메시와 í´ë¦¬ê³¤ì´ ë³´ì´ê²Œ ë©ë‹ˆ" "다." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "씬 변경 ì‚¬í• ë™ê¸°í™”" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "ì´ ì„¤ì •ì´ í™œì„±í™”ëœ ê²½ìš°, 편집기ì—ì„œ ì”¬ì„ ìˆ˜ì •í•˜ë©´ 실행 ì¤‘ì¸ ê²Œìž„ì—ë„ ë°˜ì˜ë©ë‹ˆ" "다.\n" @@ -2846,15 +2859,17 @@ msgstr "" "ì 입니다." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "스í¬ë¦½íŠ¸ 변경 ì‚¬í• ë™ê¸°í™”" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "ì´ ì„¤ì •ì´ í™œì„±í™”ëœ ê²½ìš°, ì–´ë–¤ 스í¬ë¦½íŠ¸ë“ ì €ìž¥í•˜ë©´ ì‹¤í–‰ì¤‘ì¸ ê²Œìž„ì—ë„ ìƒˆë¡œê³ ì¹¨" "ë˜ì–´ ë°˜ì˜ë©ë‹ˆë‹¤.\n" @@ -2918,7 +2933,7 @@ msgstr "ë„움ë§" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "검색" @@ -3330,9 +3345,11 @@ msgid "Add Key/Value Pair" msgstr "키/ê°’ ìŒ ì¶”ê°€" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "ì´ í”Œëž«í¼ìœ¼ë¡œ ì‹¤í–‰í• ìˆ˜ 있는 내보내기 í”„ë¦¬ì…‹ì´ ì—†ìŠµë‹ˆë‹¤.\n" "내보내기 메뉴ì—ì„œ ì‹¤í–‰í• ìˆ˜ 있는 í”„ë¦¬ì…‹ì„ ì¶”ê°€í•´ì£¼ì„¸ìš”." @@ -5090,7 +5107,7 @@ msgid "Bake Lightmaps" msgstr "ë¼ì´íŠ¸ë§µ 굽기" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "미리 보기" @@ -7723,7 +7740,8 @@ msgid "New Animation" msgstr "새 ì• ë‹ˆë©”ì´ì…˜" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "ì†ë„ (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10255,11 +10273,18 @@ msgid "Batch Rename" msgstr "ì¼ê´„ ì´ë¦„ 바꾸기" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "바꾸기: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "ì ‘ë‘사" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "ì ‘ë¯¸ì‚¬" #: editor/rename_dialog.cpp @@ -10307,7 +10332,8 @@ msgid "Per-level Counter" msgstr "단계별 ì¹´ìš´í„°" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "ì„¤ì •í•˜ë©´ ê° ê·¸ë£¹ì˜ ìžì‹ ë…¸ë“œì˜ ì¹´ìš´í„°ë¥¼ 다시 시작합니다" #: editor/rename_dialog.cpp @@ -10367,7 +10393,8 @@ msgid "Reset" msgstr "ë˜ëŒë¦¬ê¸°" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "ì •ê·œ í‘œí˜„ì‹ ì˜¤ë¥˜" #: editor/rename_dialog.cpp @@ -12415,6 +12442,11 @@ msgstr "" "GIProbe는 GLES2 비디오 ë“œë¼ì´ë²„ì—ì„œ 지ì›í•˜ì§€ 않습니다.\n" "ëŒ€ì‹ BakedLightmapì„ ì‚¬ìš©í•˜ì„¸ìš”." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "SpotLightì˜ ê°ë„를 90ë„ ì´ìƒìœ¼ë¡œ 잡게ë˜ë©´ 그림ìžë¥¼ 투ì˜í• 수 없습니다." @@ -12714,6 +12746,16 @@ msgstr "Varyingì€ ê¼ì§“ì 함수ì—만 ì§€ì •í• ìˆ˜ 있습니다." msgid "Constants cannot be modified." msgstr "ìƒìˆ˜ëŠ” ìˆ˜ì •í• ìˆ˜ 없습니다." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "íŒŒì¼ ì‹œìŠ¤í…œê³¼ ê°€ì ¸ì˜¤ê¸° ë…" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "내보내거나 ë°°í¬í• ë•Œ, ê²°ê³¼ 실행 파ì¼ì€ ë””ë²„ê¹…ì„ ìœ„í•´ ì´ ì»´í“¨í„°ì˜ IP와 ì—°ê²°" +#~ "ì„ ì‹œë„í• ê²ƒìž…ë‹ˆë‹¤." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "현재 ì”¬ì´ ì•„ì§ ì €ìž¥ë˜ì§€ 않았습니다. 실행하기 ì „ì— ì €ìž¥í•´ì£¼ì„¸ìš”." diff --git a/editor/translations/lt.po b/editor/translations/lt.po index 01d9abae70..c723a4ebb5 100644 --- a/editor/translations/lt.po +++ b/editor/translations/lt.po @@ -5,12 +5,13 @@ # Ignas Kiela <ignaskiela@super.lt>, 2017. # Kornelijus <kornelijus.github@gmail.com>, 2017, 2018. # Ignotas Gražys <ignotas.gr@gmail.com>, 2020. +# Kornelijus TvarijanaviÄius <kornelitvari@protonmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-07-06 04:41+0000\n" -"Last-Translator: Ignotas Gražys <ignotas.gr@gmail.com>\n" +"PO-Revision-Date: 2020-09-22 03:23+0000\n" +"Last-Translator: Kornelijus TvarijanaviÄius <kornelitvari@protonmail.com>\n" "Language-Team: Lithuanian <https://hosted.weblate.org/projects/godot-engine/" "godot/lt/>\n" "Language: lt\n" @@ -19,12 +20,13 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=n==1 ? 0 : n%10>=2 && (n%100<10 || n" "%100>=20) ? 1 : n%10==0 || (n%100>10 && n%100<20) ? 2 : 3;\n" -"X-Generator: Weblate 4.2-dev\n" +"X-Generator: Weblate 4.3-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp msgid "Invalid type argument to convert(), use TYPE_* constants." -msgstr "Netinkamo tipo argumentas į convert(), naudoti TYPE_* konstantas." +msgstr "" +"Netinkamo tipo argumentas į funkcijÄ… convert(), naudokite TYPE_* konstantas." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." @@ -530,6 +532,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -712,7 +715,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "" @@ -743,11 +746,11 @@ msgstr "Priartinti" #: editor/plugins/texture_region_editor_plugin.cpp #: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp msgid "Zoom Out" -msgstr "Nutolinti" +msgstr "IÅ¡tolinti" #: editor/code_editor.cpp msgid "Reset Zoom" -msgstr "Atstatyti PriartinimÄ…" +msgstr "Atstatyti priartinimÄ…" #: editor/code_editor.cpp msgid "Warnings" @@ -862,7 +865,7 @@ msgstr "" #: editor/run_settings_dialog.cpp editor/settings_config_dialog.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Close" -msgstr "Uždaryti" +msgstr "Užverti" #: editor/connections_dialog.cpp msgid "Connect" @@ -913,6 +916,11 @@ msgid "Signals" msgstr "Signalai" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtrai..." + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -953,7 +961,7 @@ msgid "Recent:" msgstr "Naujausi:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "" @@ -1626,16 +1634,16 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "" - -#: editor/editor_feature_profile.cpp #, fuzzy msgid "Node Dock" msgstr "Naujas pavadinimas:" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "FileSystem Dock" +msgstr "" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1912,7 +1920,7 @@ msgstr "" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2756,22 +2764,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2780,8 +2792,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2790,32 +2802,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2876,7 +2888,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3047,15 +3059,15 @@ msgstr "" #: editor/editor_node.cpp msgid "Open 2D Editor" -msgstr "Atidaryti 2D Editorių" +msgstr "Atverti 2D editorių" #: editor/editor_node.cpp msgid "Open 3D Editor" -msgstr "Atidaryti 3D Editorių" +msgstr "Atverti 3D editorių" #: editor/editor_node.cpp msgid "Open Script Editor" -msgstr "Atidaryti Skriptų Editorių" +msgstr "Atverti skriptų editorių" #: editor/editor_node.cpp editor/project_manager.cpp msgid "Open Asset Library" @@ -3285,7 +3297,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -5077,7 +5090,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7722,7 +7735,7 @@ msgid "New Animation" msgstr "Animacija" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10207,11 +10220,15 @@ msgid "Batch Rename" msgstr "Animacija: Pervadinti Takelį" #: editor/rename_dialog.cpp -msgid "Prefix" +msgid "Replace:" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10258,7 +10275,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10318,7 +10335,7 @@ msgid "Reset" msgstr "Atstatyti PriartinimÄ…" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -10430,9 +10447,8 @@ msgid "Delete %d nodes and any children?" msgstr "IÅ¡trinti EfektÄ…" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Delete %d nodes?" -msgstr "IÅ¡trinti EfektÄ…" +msgstr "IÅ¡trinti %d nodus?" #: editor/scene_tree_dock.cpp msgid "Delete the root node \"%s\"?" @@ -10443,9 +10459,8 @@ msgid "Delete node \"%s\" and its children?" msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Delete node \"%s\"?" -msgstr "IÅ¡trinti EfektÄ…" +msgstr "IÅ¡trinti nodÄ… \"%s\"?" #: editor/scene_tree_dock.cpp msgid "Can not perform with the root node." @@ -12299,6 +12314,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/lv.po b/editor/translations/lv.po index 43bcc6beb0..faf22e8f4e 100644 --- a/editor/translations/lv.po +++ b/editor/translations/lv.po @@ -529,6 +529,7 @@ msgid "Seconds" msgstr "Sekundes" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -707,7 +708,7 @@ msgstr "Atrast GadÄ«jumu" msgid "Whole Words" msgstr "Visu VÄrdu" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Aizvietot" @@ -900,6 +901,11 @@ msgid "Signals" msgstr "SignÄli" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "No SignÄla:" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" "Vai esat droÅ¡s(Å¡a), ka vÄ“laties noņemt visus savienojumus no Å¡Ä« signÄla?" @@ -938,7 +944,7 @@ msgid "Recent:" msgstr "Nesenie:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "MeklÄ“t:" @@ -1622,15 +1628,15 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" +msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Node Dock" +msgid "FileSystem Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1893,7 +1899,7 @@ msgstr "" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2719,22 +2725,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2743,8 +2753,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2753,32 +2763,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2838,7 +2848,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3238,7 +3248,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -4962,7 +4973,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7572,7 +7583,7 @@ msgid "New Animation" msgstr "OptimizÄ“t animÄciju" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10023,11 +10034,16 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Aizvietot: " + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10073,7 +10089,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10132,7 +10148,7 @@ msgid "Reset" msgstr "AtiestatÄ«t tÄlummaiņu" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -12091,6 +12107,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/mi.po b/editor/translations/mi.po index 8f922c0f43..d0e967f5bd 100644 --- a/editor/translations/mi.po +++ b/editor/translations/mi.po @@ -500,6 +500,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -678,7 +679,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "" @@ -867,6 +868,10 @@ msgid "Signals" msgstr "" #: editor/connections_dialog.cpp +msgid "Filter signals" +msgstr "" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -904,7 +909,7 @@ msgid "Recent:" msgstr "" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "" @@ -1573,15 +1578,15 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" +msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Node Dock" +msgid "FileSystem Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1844,7 +1849,7 @@ msgstr "" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2669,22 +2674,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2693,8 +2702,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2703,32 +2712,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2788,7 +2797,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3188,7 +3197,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -4912,7 +4922,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7494,7 +7504,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -9901,11 +9911,15 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +msgid "Replace:" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -9951,7 +9965,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10009,7 +10023,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -11938,6 +11952,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/ml.po b/editor/translations/ml.po index 458429641d..25ae499eac 100644 --- a/editor/translations/ml.po +++ b/editor/translations/ml.po @@ -510,6 +510,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -688,7 +689,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "" @@ -877,6 +878,10 @@ msgid "Signals" msgstr "" #: editor/connections_dialog.cpp +msgid "Filter signals" +msgstr "" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -914,7 +919,7 @@ msgid "Recent:" msgstr "" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "" @@ -1583,15 +1588,15 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" +msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Node Dock" +msgid "FileSystem Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1854,7 +1859,7 @@ msgstr "" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2681,22 +2686,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2705,8 +2714,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2715,32 +2724,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2800,7 +2809,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3200,7 +3209,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -4927,7 +4937,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7510,7 +7520,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -9917,11 +9927,15 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +msgid "Replace:" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -9967,7 +9981,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10025,7 +10039,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -11955,6 +11969,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/mr.po b/editor/translations/mr.po index dc88f027c0..c17092697d 100644 --- a/editor/translations/mr.po +++ b/editor/translations/mr.po @@ -507,6 +507,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -685,7 +686,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "" @@ -874,6 +875,10 @@ msgid "Signals" msgstr "" #: editor/connections_dialog.cpp +msgid "Filter signals" +msgstr "" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -911,7 +916,7 @@ msgid "Recent:" msgstr "" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "" @@ -1580,15 +1585,15 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" +msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Node Dock" +msgid "FileSystem Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1851,7 +1856,7 @@ msgstr "" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2676,22 +2681,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2700,8 +2709,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2710,32 +2719,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2795,7 +2804,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3195,7 +3204,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -4919,7 +4929,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7501,7 +7511,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -9908,11 +9918,15 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +msgid "Replace:" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -9958,7 +9972,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10016,7 +10030,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -11945,6 +11959,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/ms.po b/editor/translations/ms.po index b25e23a674..19d36c70cd 100644 --- a/editor/translations/ms.po +++ b/editor/translations/ms.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-09-08 11:40+0000\n" +"PO-Revision-Date: 2020-09-15 07:17+0000\n" "Last-Translator: Keviindran Ramachandran <keviinx@yahoo.com>\n" "Language-Team: Malay <https://hosted.weblate.org/projects/godot-engine/godot/" "ms/>\n" @@ -530,6 +530,7 @@ msgid "Seconds" msgstr "Saat" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -708,7 +709,7 @@ msgstr "Kes Padan" msgid "Whole Words" msgstr "Seluruh Perkataan" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Ganti" @@ -903,6 +904,11 @@ msgid "Signals" msgstr "Isyarat" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Dari Isyarat:" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" "Adakah anda pasti anda mahu mengeluarkan semua sambungan dari isyarat ini?" @@ -941,7 +947,7 @@ msgid "Recent:" msgstr "Terkini:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Cari:" @@ -1633,18 +1639,19 @@ msgid "Scene Tree Editing" msgstr "Penyuntingan Pokok Adegan" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Import Dok" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Dok nod" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +#, fuzzy +msgid "FileSystem Dock" msgstr "Sistem Fail dan Dok Import" #: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Import Dok" + +#: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" msgstr "Padamkan profil '%s'? (tidak boleh buat asal)" @@ -1906,7 +1913,7 @@ msgstr "Direktori & Fail:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Pratonton:" @@ -2447,45 +2454,47 @@ msgstr "Jalan Cepat Adegan..." #: editor/editor_node.cpp msgid "Quit" -msgstr "" +msgstr "Keluar" #: editor/editor_node.cpp msgid "Exit the editor?" -msgstr "" +msgstr "Keluar dari editor?" #: editor/editor_node.cpp msgid "Open Project Manager?" -msgstr "" +msgstr "Buka Pengurus Projek?" #: editor/editor_node.cpp msgid "Save & Quit" -msgstr "" +msgstr "Simpan & Keluar" #: editor/editor_node.cpp msgid "Save changes to the following scene(s) before quitting?" -msgstr "" +msgstr "Simpan perubahan pada adegan berikut sebelum keluar?" #: editor/editor_node.cpp msgid "Save changes the following scene(s) before opening Project Manager?" -msgstr "" +msgstr "Simpan perubahan adegan berikut sebelum membuka Pengurus Projek?" #: editor/editor_node.cpp msgid "" "This option is deprecated. Situations where refresh must be forced are now " "considered a bug. Please report." msgstr "" +"Pilihan ini tidak digunakan lagi. Situasi di mana penyegaran mesti dipaksa " +"sekarang dianggap sebagai pepijat. Sila laporkan." #: editor/editor_node.cpp msgid "Pick a Main Scene" -msgstr "" +msgstr "Pilih Adegan Utama" #: editor/editor_node.cpp msgid "Close Scene" -msgstr "" +msgstr "Tutup Adegan" #: editor/editor_node.cpp msgid "Reopen Closed Scene" -msgstr "" +msgstr "Buka Semula Adegan Tertutup" #: editor/editor_node.cpp msgid "Unable to enable addon plugin at: '%s' parsing of config failed." @@ -2764,22 +2773,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2788,8 +2801,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2798,32 +2811,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2883,7 +2896,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3283,7 +3296,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -5013,7 +5027,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7604,7 +7618,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10024,11 +10038,16 @@ msgid "Batch Rename" msgstr "Ubah Nama Trek Anim" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Ganti" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10074,7 +10093,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10132,7 +10151,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -12070,6 +12089,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/nb.po b/editor/translations/nb.po index a31504e186..33758ee5cd 100644 --- a/editor/translations/nb.po +++ b/editor/translations/nb.po @@ -555,6 +555,7 @@ msgid "Seconds" msgstr "Sekunder" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -744,7 +745,7 @@ msgstr "Match Tilfelle" msgid "Whole Words" msgstr "Hele Ord" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Erstatt" @@ -949,6 +950,11 @@ msgid "Signals" msgstr "Signaler" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtrer Filer..." + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" "Er du sikker pÃ¥ at du ønsker Ã¥ fjerne alle koblinger fra dette signalet?" @@ -990,7 +996,7 @@ msgid "Recent:" msgstr "Nylige:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Søk:" @@ -1709,21 +1715,21 @@ msgstr "" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "Import Dock" -msgstr "Importer" - -#: editor/editor_feature_profile.cpp -#, fuzzy msgid "Node Dock" msgstr "Flytt Modus" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "FileSystem and Import Docks" +msgid "FileSystem Dock" msgstr "FilSystem" #: editor/editor_feature_profile.cpp #, fuzzy +msgid "Import Dock" +msgstr "Importer" + +#: editor/editor_feature_profile.cpp +#, fuzzy msgid "Erase profile '%s'? (no undo)" msgstr "Erstatt Alle" @@ -2010,7 +2016,7 @@ msgstr "Mapper og Filer:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "ForhÃ¥ndsvisning:" @@ -2927,26 +2933,29 @@ msgid "Deploy with Remote Debug" msgstr "Distribuer med ekstern feilsøking" #: editor/editor_node.cpp -#, fuzzy msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Ved eksportering eller deploying, den følgende kjørbare filen vil prøve Ã¥ " -"koble til IP'en til denne datamaskinen for Ã¥ bli debugget." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Liten utrulling med Network FS" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "NÃ¥r dette alternativet er aktivert, eksportering eller distribuering vil " "produsere en kjørbar fil.\n" @@ -2959,9 +2968,10 @@ msgid "Visible Collision Shapes" msgstr "Synlige kollisjons-former" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Kollisjons-former eller raycast-noder (for 2D og 3D) vil være synlige under " "kjøring av spill om denne innstillingen er aktivert." @@ -2971,23 +2981,26 @@ msgid "Visible Navigation" msgstr "Synlig navigasjon" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Navigasjons-maske og polygoner vil være synlig under kjøring av spill om " "denne innstillingen er aktivert." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Synkroniser Sceneendringer" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "NÃ¥r denne innstillingen er aktivert, alle endringer gjort til scenen i " "editoren vil bli replikert i det kjørende spillet.\n" @@ -2995,16 +3008,17 @@ msgstr "" "nettverksfilsystem." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Synkroniser Skriptendringer" #: editor/editor_node.cpp #, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "NÃ¥r denne innstillingen er aktivert, alle skript som er lagret vil lastes " "inn pÃ¥ nytt i det kjørende spillet.\n" @@ -3076,7 +3090,7 @@ msgstr "Hjelp" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Søk" @@ -3504,9 +3518,11 @@ msgid "Add Key/Value Pair" msgstr "Legg Til Nøkkel/Verdi Par" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Ingen kjørbar eksport-preset funnet for denne plattformen.\n" "Vennligst legg til en kjørbar preset i eksportmenyen." @@ -5402,7 +5418,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "ForhÃ¥ndsvis" @@ -8180,7 +8196,8 @@ msgid "New Animation" msgstr "Animasjon" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "Hastighet (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10760,11 +10777,16 @@ msgid "Batch Rename" msgstr "Endre navn" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Erstatt: " + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10816,7 +10838,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10878,8 +10900,9 @@ msgid "Reset" msgstr "Nullstill Zoom" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" -msgstr "" +#, fuzzy +msgid "Regular Expression Error:" +msgstr "Gjeldende Versjon:" #: editor/rename_dialog.cpp #, fuzzy @@ -12936,6 +12959,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -13194,6 +13222,18 @@ msgstr "" msgid "Constants cannot be modified." msgstr "Konstanter kan ikke endres." +#, fuzzy +#~ msgid "FileSystem and Import Docks" +#~ msgstr "FilSystem" + +#, fuzzy +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Ved eksportering eller deploying, den følgende kjørbare filen vil prøve Ã¥ " +#~ "koble til IP'en til denne datamaskinen for Ã¥ bli debugget." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "Gjeldende scene ble aldri lagret, vennligst lagre før kjøring." diff --git a/editor/translations/nl.po b/editor/translations/nl.po index 1dabe25c73..122782e1b0 100644 --- a/editor/translations/nl.po +++ b/editor/translations/nl.po @@ -567,6 +567,7 @@ msgid "Seconds" msgstr "Seconden" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -745,7 +746,7 @@ msgstr "Hoofdlettergevoelig" msgid "Whole Words" msgstr "Hele woorden" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Vervangen" @@ -939,6 +940,11 @@ msgid "Signals" msgstr "Signalen" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filter tegels" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" "Weet je zeker dat je alle verbindingen naar dit signaal wilt verwijderen?" @@ -977,7 +983,7 @@ msgid "Recent:" msgstr "Onlangs:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Zoeken:" @@ -1669,16 +1675,17 @@ msgid "Scene Tree Editing" msgstr "Scèneboombewerking" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Importtabblad" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Knooptabblad" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Bestandssysteem- en Importtablad" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Bestandssysteem" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Importtabblad" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1942,7 +1949,7 @@ msgstr "Mappen & Bestanden:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Voorbeeld:" @@ -2822,24 +2829,28 @@ msgstr "Opstarten met debugging op afstand" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Na het exporteren of opstarten van het programma zal het proberen verbinding " -"maken met het IP-adres van deze computer zodat het gedebugd kan worden." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Klein uitvoerbaar bestand opstarten met netwerk bestandsserver" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Wanneer deze optie is ingeschakeld, zal export of deploy een minimaal " "uitvoerbaar bestand creëren.\n" @@ -2853,9 +2864,10 @@ msgid "Visible Collision Shapes" msgstr "Toon collision shapes" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Botsingsdetectievormen en raycast knopen (voor 2D en 3D) zullen zichtbaar " "zijn in het draaiend spel wanneer deze optie aan staat." @@ -2865,23 +2877,26 @@ msgid "Visible Navigation" msgstr "Navigatie zichtbaar" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Navigatie meshes en polygonen zijn zichtbaar in het draaiend spel wanneer " "deze optie aanstaat." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Scèneveranderingen synchroniseren" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Wanneer deze optie aanstaat, wordt elke verandering gemaakt in de editor " "toegepast op het draaiend spel.\n" @@ -2889,15 +2904,17 @@ msgstr "" "efficiënter met het netwerk bestandssysteem." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Scriptveranderingen synchroniseren" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Wanneer deze optie aanstaat wordt ieder script dat wordt opgeslagen " "toegepast op het draaiend spel.\n" @@ -2961,7 +2978,7 @@ msgstr "Help" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Zoeken" @@ -3381,9 +3398,11 @@ msgid "Add Key/Value Pair" msgstr "Sleutel/waarde-paar toevoegen" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Geen uitvoerbare export preset gevonden voor dit platform.\n" "Voeg een uitvoerbare preset toe in het exportmenu." @@ -5152,7 +5171,7 @@ msgid "Bake Lightmaps" msgstr "Bak Lichtmappen" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Voorbeeld" @@ -7806,7 +7825,8 @@ msgid "New Animation" msgstr "Niewe animatie" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "Snelheid (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10386,11 +10406,18 @@ msgid "Batch Rename" msgstr "Bulk hernoemen" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Vervangen: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "Voorvoegsel" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "Achtervoegsel" #: editor/rename_dialog.cpp @@ -10438,7 +10465,8 @@ msgid "Per-level Counter" msgstr "Per niveau teller" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "" "Indien ingesteld: herstart de teller voor iedere groep van onderliggende " "knopen" @@ -10500,7 +10528,8 @@ msgid "Reset" msgstr "Resetten" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "Fout in reguliere expressie" #: editor/rename_dialog.cpp @@ -12580,6 +12609,11 @@ msgstr "" "GIProbes worden niet ondersteund door het GLES2 grafische stuurprogramma.\n" "Gebruik in plaats daarvan een BakedLightmap." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12886,6 +12920,17 @@ msgstr "Varyings kunnen alleen worden toegewezenin vertex functies." msgid "Constants cannot be modified." msgstr "Constanten kunnen niet worden aangepast." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Bestandssysteem- en Importtablad" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Na het exporteren of opstarten van het programma zal het proberen " +#~ "verbinding maken met het IP-adres van deze computer zodat het gedebugd " +#~ "kan worden." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "De huidige scène is nooit opgeslagen, sla het op voor het uitvoeren." diff --git a/editor/translations/or.po b/editor/translations/or.po index 220638494d..11fc082ecd 100644 --- a/editor/translations/or.po +++ b/editor/translations/or.po @@ -506,6 +506,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -684,7 +685,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "" @@ -873,6 +874,10 @@ msgid "Signals" msgstr "" #: editor/connections_dialog.cpp +msgid "Filter signals" +msgstr "" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -910,7 +915,7 @@ msgid "Recent:" msgstr "" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "" @@ -1579,15 +1584,15 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" +msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Node Dock" +msgid "FileSystem Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1850,7 +1855,7 @@ msgstr "" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2675,22 +2680,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2699,8 +2708,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2709,32 +2718,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2794,7 +2803,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3194,7 +3203,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -4918,7 +4928,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7500,7 +7510,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -9907,11 +9917,15 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +msgid "Replace:" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -9957,7 +9971,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10015,7 +10029,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -11944,6 +11958,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/pl.po b/editor/translations/pl.po index dd93a0ec83..7be793ffd2 100644 --- a/editor/translations/pl.po +++ b/editor/translations/pl.po @@ -5,8 +5,8 @@ # 8-bit Pixel <dawdejw@gmail.com>, 2016. # Adam Wolanski <adam.wolanski94@gmail.com>, 2017. # Adrian WÄ™cÅ‚awski <weclawskiadrian@gmail.com>, 2016. -# aelspire <aelspire@gmail.com>, 2017, 2019. -# Daniel Lewan <vision360.daniel@gmail.com>, 2016-2018. +# aelspire <aelspire@gmail.com>, 2017, 2019, 2020. +# Daniel Lewan <vision360.daniel@gmail.com>, 2016-2018, 2020. # Dariusz Król <rexioweb@gmail.com>, 2018. # heya10 <igor.gielzak@gmail.com>, 2017. # holistyczny interlokutor <jakubowesmieci@gmail.com>, 2017. @@ -16,17 +16,17 @@ # Karol Walasek <coreconviction@gmail.com>, 2016. # Maksymilian Åšwiąć <maksymilian.swiac@gmail.com>, 2017-2018. # Mietek SzczeÅ›niak <ravaging@go2.pl>, 2016. -# NeverK <neverkoxu@gmail.com>, 2018, 2019. -# Rafal Brozio <rafal.brozio@gmail.com>, 2016, 2019. +# NeverK <neverkoxu@gmail.com>, 2018, 2019, 2020. +# Rafal Brozio <rafal.brozio@gmail.com>, 2016, 2019, 2020. # RafaÅ‚ Ziemniak <synaptykq@gmail.com>, 2017. # RM <synaptykq@gmail.com>, 2018, 2020. # Sebastian Krzyszkowiak <dos@dosowisko.net>, 2017. -# Sebastian Pasich <sebastian.pasich@gmail.com>, 2017, 2019. +# Sebastian Pasich <sebastian.pasich@gmail.com>, 2017, 2019, 2020. # siatek papieros <sbigneu@gmail.com>, 2016. -# Zatherz <zatherz@linux.pl>, 2017. +# Zatherz <zatherz@linux.pl>, 2017, 2020. # Tomek <kobewi4e@gmail.com>, 2018, 2019, 2020. # Wojcieh Er Zet <wojcieh.rzepecki@gmail.com>, 2018. -# Dariusz Siek <dariuszynski@gmail.com>, 2018, 2019. +# Dariusz Siek <dariuszynski@gmail.com>, 2018, 2019, 2020. # Szymon Nowakowski <smnbdg13@gmail.com>, 2019. # Nie Powiem <blazek10@tlen.pl>, 2019. # Sebastian Hojka <sibibibi1@gmail.com>, 2019. @@ -42,12 +42,14 @@ # Adam Jagoda <kontakt@lukasz.xyz>, 2020. # Filip Glura <mcmr.slendy@gmail.com>, 2020. # Roman Skiba <romanskiba0@gmail.com>, 2020. +# Piotr Grodzki <ziemniakglados@gmail.com>, 2020. +# Dzejkop <jakubtrad@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-09-01 18:42+0000\n" -"Last-Translator: Roman Skiba <romanskiba0@gmail.com>\n" +"PO-Revision-Date: 2020-09-22 03:23+0000\n" +"Last-Translator: Zatherz <zatherz@linux.pl>\n" "Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/" "godot/pl/>\n" "Language: pl\n" @@ -56,7 +58,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.2.1-dev\n" +"X-Generator: Weblate 4.3-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -245,7 +247,7 @@ msgstr "Åšcieżka krzywej Béziera" #: editor/animation_track_editor.cpp msgid "Audio Playback Track" -msgstr "Åšcieżka audio" +msgstr "Åšcieżka dźwiÄ™kowa" #: editor/animation_track_editor.cpp msgid "Animation Playback Track" @@ -347,12 +349,12 @@ msgstr "Przytnij" #: editor/animation_track_editor.cpp msgid "Wrap Loop Interp" -msgstr "ZawiÅ„" +msgstr "ZawiÅ„ pÄ™tlÄ™ interpolacji" #: editor/animation_track_editor.cpp #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Insert Key" -msgstr "Wstaw klucz" +msgstr "Wprowadź klucz" #: editor/animation_track_editor.cpp msgid "Duplicate Key(s)" @@ -364,7 +366,7 @@ msgstr "UsuÅ„ klucz(e)" #: editor/animation_track_editor.cpp msgid "Change Animation Update Mode" -msgstr "ZmieÅ„ tryb zmiany animacji" +msgstr "ZmieÅ„ sposób aktualizacji animacji" #: editor/animation_track_editor.cpp msgid "Change Animation Interpolation Mode" @@ -384,7 +386,7 @@ msgstr "Utworzyć NOWÄ„ Å›cieżkÄ™ dla %s i wstawić klucz?" #: editor/animation_track_editor.cpp msgid "Create %d NEW tracks and insert keys?" -msgstr "Utworzyć %d NOWYCH Å›cieżek i wstawić klucze?" +msgstr "Utworzyć %d NOWYCH Å›cieżek i dodać klatki kluczowe?" #: editor/animation_track_editor.cpp editor/create_dialog.cpp #: editor/editor_audio_buses.cpp editor/editor_feature_profile.cpp @@ -565,6 +567,7 @@ msgid "Seconds" msgstr "sekund" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "klatek na sekundÄ™" @@ -743,7 +746,7 @@ msgstr "UwzglÄ™dnij wielkość liter" msgid "Whole Words" msgstr "CaÅ‚e sÅ‚owa" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "ZastÄ…p" @@ -935,6 +938,11 @@ msgid "Signals" msgstr "SygnaÅ‚y" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtruj kafelki" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Na pewno chcesz usunąć wszystkie poÅ‚Ä…czenia z tego sygnaÅ‚u?" @@ -972,7 +980,7 @@ msgid "Recent:" msgstr "Ostatnie:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Szukaj:" @@ -1130,7 +1138,7 @@ msgstr "Zasoby bez jawnych wÅ‚aÅ›cicieli:" #: editor/dictionary_property_edit.cpp msgid "Change Dictionary Key" -msgstr "ZmieÅ„ klucz tablicy" +msgstr "ZmieÅ„ klucz sÅ‚ownika" #: editor/dictionary_property_edit.cpp msgid "Change Dictionary Value" @@ -1176,14 +1184,12 @@ msgid "Gold Sponsors" msgstr "ZÅ‚oci sponsorzy" #: editor/editor_about.cpp -#, fuzzy msgid "Silver Sponsors" -msgstr "Srebrni darczyÅ„cy" +msgstr "Srebrni sponsorzy" #: editor/editor_about.cpp -#, fuzzy msgid "Bronze Sponsors" -msgstr "BrÄ…zowi darczyÅ„cy" +msgstr "BrÄ…zowi sponsorzy" #: editor/editor_about.cpp msgid "Mini Sponsors" @@ -1308,7 +1314,7 @@ msgstr "PrzeÅ‚Ä…cz ominiÄ™cie efektów w magistrali audio" #: editor/editor_audio_buses.cpp msgid "Select Audio Bus Send" -msgstr "Wybierz szynÄ™ wysyÅ‚ki audio" +msgstr "Wybierz przesyÅ‚ magistrali audio" #: editor/editor_audio_buses.cpp msgid "Add Audio Bus Effect" @@ -1661,16 +1667,17 @@ msgid "Scene Tree Editing" msgstr "Edycja drzewa sceny" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Dok importowania" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Dok wÄ™zÅ‚a" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Doki systemu plików i importowania" +#, fuzzy +msgid "FileSystem Dock" +msgstr "System plików" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Dok importowania" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1933,7 +1940,7 @@ msgstr "Katalogi i pliki:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "PodglÄ…d:" @@ -2808,24 +2815,28 @@ msgstr "Uruchom z użyciem zdalnego debugowania" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Podczas eksportu lub uruchomienia, aplikacja wynikowa spróbuje poÅ‚Ä…czyć siÄ™ " -"z adresem IP tego komputera w celu debugowania." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Testuj z sieciowym systemem plików" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Gdy ta opcja jest zaznaczona, eksportowanie utworzy jak najmniejszy plik " "wykonywalny.\n" @@ -2838,9 +2849,10 @@ msgid "Visible Collision Shapes" msgstr "Widoczne ksztaÅ‚ty kolizji" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "KsztaÅ‚ty kolizji i promienie raycast (2D i 3D) bÄ™dÄ… widoczne, jeÅ›li ta opcja " "bÄ™dzie zaznaczona." @@ -2850,23 +2862,26 @@ msgid "Visible Navigation" msgstr "Widoczna nawigacja" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "KsztaÅ‚ty i poligony nawigacyjne bÄ™dÄ… widoczne, jeÅ›li ta opcja bÄ™dzie " "zaznaczona." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Synchronizuj zmiany w scenie" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Kiedy ta opcja jest wÅ‚Ä…czona, wszystkie zmiany na scenie w edytorze bÄ™dÄ… " "powtórzone w uruchomionej grze.\n" @@ -2874,15 +2889,17 @@ msgstr "" "systemie plików." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Synchronizuj zmiany skryptów" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Kiedy ta opcja jest wÅ‚Ä…czona, każdy zapisany skrypt bÄ™dzie przeÅ‚adowany w " "uruchomionej grze.\n" @@ -2946,7 +2963,7 @@ msgstr "Pomoc" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Szukaj" @@ -3103,7 +3120,7 @@ msgstr "Szablonowy pakiet" #: editor/editor_node.cpp msgid "Export Library" -msgstr "Wyeksportuj biblioteke" +msgstr "Wyeksportuj bibliotekÄ™" #: editor/editor_node.cpp msgid "Merge With Existing" @@ -3216,7 +3233,7 @@ msgstr "Klatka %" #: editor/editor_profiler.cpp msgid "Physics Frame %" -msgstr "Klatki Fizyki %" +msgstr "Klatka fizyki %" #: editor/editor_profiler.cpp msgid "Inclusive" @@ -3362,9 +3379,11 @@ msgid "Add Key/Value Pair" msgstr "Dodaj parÄ™ klucz/wartość" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Nie znaleziono możliwego do uruchomienia profilu eksportu dla tej " "platformy.\n" @@ -3948,11 +3967,11 @@ msgstr "Importuj oddzielnie obiekty i animacje" #: editor/import/resource_importer_scene.cpp msgid "Import with Separate Materials+Animations" -msgstr "Importuj wraz z Oddzielnymi MateriaÅ‚ami i Animacjami" +msgstr "Zaimportuj osobno MateriaÅ‚y+Animacje" #: editor/import/resource_importer_scene.cpp msgid "Import with Separate Objects+Materials+Animations" -msgstr "Importuj wraz z Oddzielnymi Obiektami, MateriaÅ‚ami i Animacjami" +msgstr "Zaimportuj osobno Obiekty+MateriaÅ‚y+Animacje" #: editor/import/resource_importer_scene.cpp msgid "Import as Multiple Scenes" @@ -4075,11 +4094,11 @@ msgstr "Kopiuj zasób" #: editor/inspector_dock.cpp msgid "Make Built-In" -msgstr "Skrypt wbudowany" +msgstr "Stwórz wbudowany" #: editor/inspector_dock.cpp msgid "Make Sub-Resources Unique" -msgstr "Utwórz unikalne pod-zasoby" +msgstr "Utwórz unikalne podzasoby" #: editor/inspector_dock.cpp msgid "Open in Help" @@ -4501,7 +4520,7 @@ msgstr "ZmieÅ„ nazwÄ™ animacji" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Blend Next Changed" -msgstr "Mieszaj nastÄ™pnÄ… zmienionÄ…" +msgstr "Zmieszaj kolejnÄ… po zmianach" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Change Blend Time" @@ -4541,7 +4560,7 @@ msgstr "Odtwórz zaznaczonÄ… animacjÄ™ od tyÅ‚u z aktualnej pozycji. (A)" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Play selected animation backwards from end. (Shift+A)" -msgstr "Odtwarzaj zaznaczonÄ… animacjÄ™ od koÅ„ca. (Shift+A)" +msgstr "Odtwórz zaznaczonÄ… animacjÄ™ od tyÅ‚u z koÅ„ca. (Shift+A)" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Stop animation playback. (S)" @@ -4605,7 +4624,7 @@ msgstr "Poprzedni" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Future" -msgstr "PrzyszÅ‚ość" +msgstr "NastÄ™pny" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Depth" @@ -4886,7 +4905,7 @@ msgstr "WÄ™zeÅ‚ Skalowania Czasu" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "TimeSeek Node" -msgstr "WÄ™zeÅ‚ TimeSeek" +msgstr "WÄ™zeÅ‚ Przewijania w Czasie" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "Transition Node" @@ -4963,8 +4982,7 @@ msgstr "Przekroczenie czasu." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Bad download hash, assuming file has been tampered with." msgstr "" -"ZÅ‚y hash pobranego pliku. ZakÅ‚adamy, że ktoś przy nim majstrowaÅ‚, lub zostaÅ‚ " -"niepoprawnie pobrany." +"ZÅ‚a suma kontrolna pobranego pliku. ZakÅ‚adamy, że ktoś przy nim majstrowaÅ‚." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Expected:" @@ -5064,7 +5082,7 @@ msgstr "Wszystko" #: editor/plugins/asset_library_editor_plugin.cpp msgid "No results for \"%s\"." -msgstr "Brak rezultatów dla \"%s\"." +msgstr "Brak wyników dla \"%s\"." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Import..." @@ -5136,7 +5154,7 @@ msgid "Bake Lightmaps" msgstr "Stwórz Lightmaps" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "PodglÄ…d" @@ -5422,7 +5440,7 @@ msgstr "" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Alt+RMB: Depth list selection" -msgstr "Alt+PPM: Lista obiektów pod spodem" +msgstr "Alt+PPM: Wybór listy gÅ‚Ä™bi" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -7785,7 +7803,8 @@ msgid "New Animation" msgstr "Nowa animacja" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "PrÄ™dkość (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10353,11 +10372,18 @@ msgid "Batch Rename" msgstr "Grupowa zmiana nazwy" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "ZastÄ…p: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "Przedrostek" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "Przyrostek" #: editor/rename_dialog.cpp @@ -10405,7 +10431,8 @@ msgid "Per-level Counter" msgstr "Oddzielny licznik na poziom" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "Gdy ustawione, licznik restartuje dla każdej grupy wÄ™złów potomnych" #: editor/rename_dialog.cpp @@ -10465,7 +10492,8 @@ msgid "Reset" msgstr "Resetuj" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "BÅ‚Ä…d wyrażenia regularnego" #: editor/rename_dialog.cpp @@ -12553,6 +12581,11 @@ msgstr "" "GIProbes nie sÄ… obsÅ‚ugiwane przez sterownik wideo GLES2.\n" "Zamiast tego użyj BakedLightmap." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "SpotLight z kÄ…tem szerszym niż 90 stopni nie może rzucać cieni." @@ -12856,6 +12889,16 @@ msgstr "Varying może być przypisane tylko w funkcji wierzchoÅ‚ków." msgid "Constants cannot be modified." msgstr "StaÅ‚e nie mogÄ… być modyfikowane." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Doki systemu plików i importowania" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Podczas eksportu lub uruchomienia, aplikacja wynikowa spróbuje poÅ‚Ä…czyć " +#~ "siÄ™ z adresem IP tego komputera w celu debugowania." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "Aktualna scena nie zostaÅ‚a zapisana, proszÄ™ zapisać scenÄ™ przed " diff --git a/editor/translations/pr.po b/editor/translations/pr.po index 9640ed40f1..d1b82cffe6 100644 --- a/editor/translations/pr.po +++ b/editor/translations/pr.po @@ -536,6 +536,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -716,7 +717,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "" @@ -914,6 +915,11 @@ msgid "Signals" msgstr "" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Paste yer Node" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -953,7 +959,7 @@ msgid "Recent:" msgstr "" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "" @@ -1634,16 +1640,17 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "" - -#: editor/editor_feature_profile.cpp #, fuzzy msgid "Node Dock" msgstr "Find ye Node Type" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Rename Variable" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1918,7 +1925,7 @@ msgstr "" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2761,22 +2768,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2785,8 +2796,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2795,32 +2806,33 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" -msgstr "" +#, fuzzy +msgid "Synchronize Script Changes" +msgstr "Change" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2883,7 +2895,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3292,7 +3304,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -5083,7 +5096,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7745,7 +7758,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10240,11 +10253,15 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +msgid "Replace:" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10292,7 +10309,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10351,7 +10368,7 @@ msgstr "" #: editor/rename_dialog.cpp #, fuzzy -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "Swap yer Expression" #: editor/rename_dialog.cpp @@ -12377,6 +12394,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/pt_PT.po b/editor/translations/pt.po index 63c82c84ba..6b6a15dda7 100644 --- a/editor/translations/pt_PT.po +++ b/editor/translations/pt.po @@ -1,4 +1,4 @@ -# Portuguese (Portugal) translation of the Godot Engine editor +# Portuguese translation of the Godot Engine editor # Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. # Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). # This file is distributed under the same license as the Godot source code. @@ -20,16 +20,16 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-08-16 15:25+0000\n" +"PO-Revision-Date: 2020-09-24 12:43+0000\n" "Last-Translator: ssantos <ssantos@web.de>\n" -"Language-Team: Portuguese (Portugal) <https://hosted.weblate.org/projects/" -"godot-engine/godot/pt_PT/>\n" -"Language: pt_PT\n" +"Language-Team: Portuguese <https://hosted.weblate.org/projects/" +"godot-engine/godot/pt/>\n" +"Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.2-dev\n" +"X-Generator: Weblate 4.3-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -540,6 +540,7 @@ msgid "Seconds" msgstr "Segundos" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -718,7 +719,7 @@ msgstr "Caso de Compatibilidade" msgid "Whole Words" msgstr "Palavras inteiras" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Substituir" @@ -836,7 +837,7 @@ msgstr "Deferido" msgid "" "Defers the signal, storing it in a queue and only firing it at idle time." msgstr "" -"Retarda o sinal, armazena-o numa fila e só ativando-o em tempo de " +"Retarda o sinal, armazena-o numa fila e só a ativar-o em tempo de " "inatividade." #: editor/connections_dialog.cpp @@ -911,6 +912,11 @@ msgid "Signals" msgstr "Sinais" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtrar Tiles" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Deseja remover todas as conexões deste sinal?" @@ -948,7 +954,7 @@ msgid "Recent:" msgstr "Recente:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Procurar:" @@ -1146,21 +1152,19 @@ msgstr "Autores" #: editor/editor_about.cpp msgid "Platinum Sponsors" -msgstr "Patrocinadores Platinum" +msgstr "Patrocinadores Platina" #: editor/editor_about.cpp msgid "Gold Sponsors" -msgstr "Patrocinadores Gold" +msgstr "Patrocinadores Ouro" #: editor/editor_about.cpp -#, fuzzy msgid "Silver Sponsors" -msgstr "Doadores Silver" +msgstr "Patrocinadores Prata" #: editor/editor_about.cpp -#, fuzzy msgid "Bronze Sponsors" -msgstr "Doadores Bronze" +msgstr "Patrocinadores Bronze" #: editor/editor_about.cpp msgid "Mini Sponsors" @@ -1518,7 +1522,7 @@ msgstr "A atualizar Cena" #: editor/editor_data.cpp msgid "Storing local changes..." -msgstr "Armazenando alterações locais..." +msgstr "A armazenar alterações locais..." #: editor/editor_data.cpp msgid "Updating scene..." @@ -1640,16 +1644,17 @@ msgid "Scene Tree Editing" msgstr "Edição da Ãrvore de Cena" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Importar Doca" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Doca de Nó" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Sistema de Ficheiros e Docas de Importação" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Sistema de Ficheiros" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Importar Doca" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1912,7 +1917,7 @@ msgstr "Diretorias e Ficheiros:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Pré-visualização:" @@ -2007,7 +2012,7 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" "Atualmente não existe descrição para esta Propriedade. Por favor ajude-nos " -"[color=$color][url=$url]contribuindo com uma[/url][/color]!" +"[color=$color][url=$url]a contribuir com uma[/url][/color]!" #: editor/editor_help.cpp msgid "Method Descriptions" @@ -2019,7 +2024,7 @@ msgid "" "$color][url=$url]contributing one[/url][/color]!" msgstr "" "Atualmente não existe descrição para este Método. Por favor ajude-nos [color=" -"$color][url=$url]contribuindo com uma[/url][/color]!" +"$color][url=$url]a contribuir com uma[/url][/color]!" #: editor/editor_help_search.cpp editor/editor_node.cpp #: editor/plugins/script_editor_plugin.cpp @@ -2233,11 +2238,11 @@ msgstr "A guardar Cena" #: editor/editor_node.cpp msgid "Analyzing" -msgstr "Analizando" +msgstr "A analizar" #: editor/editor_node.cpp msgid "Creating Thumbnail" -msgstr "Criando Miniatura" +msgstr "A criar miniatura" #: editor/editor_node.cpp msgid "This operation can't be done without a tree root." @@ -2302,7 +2307,7 @@ msgid "" "Please read the documentation relevant to importing scenes to better " "understand this workflow." msgstr "" -"Este recurso pertence a uma cena que foi importado, não sendo editável.\n" +"Este recurso pertence a uma cena que foi importado, sem ser editável.\n" "Por favor, leia a documentação relevante sobre importação de cenas, para um " "melhor entendimento deste fluxo de trabalho." @@ -2331,7 +2336,7 @@ msgid "" msgstr "" "Esta cena foi importada, portanto, as alterações à mesma não serão " "mantidas.\n" -"Instanciando-a ou herdando-a vai permitir efetuar alterações à mesma.\n" +"Instanciar-a ou herdar-a vai permitir efetuar alterações à mesma.\n" "Por favor, leia a documentação relevante sobre importação de cenas, para um " "melhor entendimento do fluxo de trabalho." @@ -2534,7 +2539,7 @@ msgid "" "Scene '%s' was automatically imported, so it can't be modified.\n" "To make changes to it, a new inherited scene can be created." msgstr "" -"Cena '%s' foi importada automaticamente, não podendo ser alterada.\n" +"Cena '%s' foi importada automaticamente, sem poder ser alterada.\n" "Para fazer alterações, pode ser criada uma nova cena herdada." #: editor/editor_node.cpp @@ -2560,8 +2565,8 @@ msgid "" "category." msgstr "" "Não foi definida nenhuma cena principal. Selecionar uma?\n" -"Poderá alterá-la depois nas \"Definições do Projeto\", na categoria " -"'aplicação'." +"Poderá alterá-la depois nas \"Configurações do Projeto\", na categoria " +"'Application'." #: editor/editor_node.cpp msgid "" @@ -2570,8 +2575,7 @@ msgid "" "category." msgstr "" "A cena selecionada '%s' não existe, selecionar uma válida?\n" -"Poderá alterá-la depois em \"Configurações de Projeto\", na categoria " -"'aplicação'." +"Poderá alterá-la depois em \"application\", na categoria 'Application'." #: editor/editor_node.cpp msgid "" @@ -2581,8 +2585,8 @@ msgid "" msgstr "" "A cena selecionada '%s' não é um ficheiro de cena, selecione um ficheiro " "válido?\n" -"Poderá alterá-la depois em \"Configurações de Projeto\", na categoria " -"'aplicação'." +"Poderá alterá-la depois em \"Configurações do Projeto\", na categoria " +"'Application." #: editor/editor_node.cpp msgid "Save Layout" @@ -2743,7 +2747,7 @@ msgstr "Projeto" #: editor/editor_node.cpp msgid "Project Settings..." -msgstr "Configurações de Projeto..." +msgstr "Configurações do Projeto..." #: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp msgid "Version Control" @@ -2792,24 +2796,28 @@ msgstr "Implementar com Depuração Remota" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Ao exportar ou distribuir, o executável vai tentar ligar-se ao IP deste " -"computador para depuração." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Pequena distribuição com Network FS" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Quando esta opção é ativada, exportação ou distribuição criará um executável " "mÃnimo.\n" @@ -2822,9 +2830,10 @@ msgid "Visible Collision Shapes" msgstr "Formas de Colisão VisÃveis" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Com esta opção ativa, formas de colisão e nós raycast (para 2D e 3D) serão " "visÃveis no jogo em execução." @@ -2834,22 +2843,25 @@ msgid "Visible Navigation" msgstr "Navegação VisÃvel" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Com esta opção ativa, Meshes e PolÃgonos serão visÃveis no jogo em execução." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Sincronizar Alterações de Cena" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Com esta opção ativa, alterações da cena no editor serão replicadas no jogo " "em execução.\n" @@ -2857,15 +2869,17 @@ msgstr "" "ficheiros em rede." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Sincronizar Alterações de Script" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Com esta opção ativa, qualquer Script guardado será recarregado no jogo em " "execução.\n" @@ -2930,7 +2944,7 @@ msgstr "Ajuda" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Procurar" @@ -3061,7 +3075,7 @@ msgstr "" "O projeto será preparado para compilações personalizadas Android com a " "instalação do modelo fonte em \"res://android/build\".\n" "Poderá depois aplicar modificações e compilar o seu APK personalizado a " -"exportar (com adição de módulos, alterando AndroidManifest.xml, etc.).\n" +"exportar (com adição de módulos, a alterar AndroidManifest.xml, etc.).\n" "Repare que de forma a criar compilações personalizadas em vez de usar APKs " "pré-compilados, a opção \"Usar Compilação Personalizada\" deve ser ativada " "na predefinição da exportação Android." @@ -3347,9 +3361,11 @@ msgid "Add Key/Value Pair" msgstr "Adicionar Par Chave/Valor" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Não foi encontrado um executável de exportação para esta plataforma.\n" "Adicione um executável pré-definido no menu de exportação." @@ -3523,7 +3539,7 @@ msgid "" "The problematic templates archives can be found at '%s'." msgstr "" "Falhou a instalação de Modelos.\n" -"Os ficheiros problemáticos podem ser encontrados em '%s'." +"Os ficheiros problemáticos encontram-se em '%s'." #: editor/export_template_manager.cpp msgid "Error requesting URL:" @@ -4025,7 +4041,7 @@ msgstr "Alterar o tipo de um ficheiro importado requer reiniciar o editor." msgid "" "WARNING: Assets exist that use this resource, they may stop loading properly." msgstr "" -"AVISO: Existem Ativos que usam este recurso, podendo não ser carregados " +"AVISO: Existem Ativos que usam este recurso, poderem não ser carregados " "corretamente." #: editor/inspector_dock.cpp @@ -4318,7 +4334,7 @@ msgstr "Alternar Triângulos Auto" #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Create triangles by connecting points." -msgstr "Criar triângulos ligando pontos." +msgstr "Criar triângulos a ligar pontos." #: editor/plugins/animation_blend_space_2d_editor.cpp msgid "Erase points and triangles." @@ -4395,13 +4411,13 @@ msgstr "Alterar Filtro" #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "No animation player set, so unable to retrieve track names." msgstr "" -"Reprodutor de animação não definido, sendo incapaz de recolher nome das " +"Reprodutor de animação não definido, a ser incapaz de recolher nome das " "faixas." #: editor/plugins/animation_blend_tree_editor_plugin.cpp msgid "Player path set is invalid, so unable to retrieve track names." msgstr "" -"Caminho do reprodutor é inválido, sendo incapaz de recolher nome das faixas." +"Caminho do reprodutor é inválido, a ser incapaz de recolher nome das faixas." #: editor/plugins/animation_blend_tree_editor_plugin.cpp #: editor/plugins/root_motion_editor_plugin.cpp @@ -4409,7 +4425,7 @@ msgid "" "Animation player has no valid root node path, so unable to retrieve track " "names." msgstr "" -"Reprodutor de animação não tem um caminha de nó raiz válido, sendo incapaz " +"Reprodutor de animação não tem um caminha de nó raiz válido, a ser incapaz " "de recolher nome das faixas." #: editor/plugins/animation_blend_tree_editor_plugin.cpp @@ -5115,7 +5131,7 @@ msgid "Bake Lightmaps" msgstr "Consolidar Lightmaps" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Pré-visualização" @@ -5612,8 +5628,8 @@ msgid "" msgstr "" "Insere chaves automaticamente quando objetos são movidos, rodados ou " "redimensionados (baseado na máscara).\n" -"Chaves apenas são adicionadas a pistas existentes, não sendo criadas novas " -"pistas.\n" +"Chaves apenas são adicionadas a pistas existentes, nenhumas pistas serão " +"criadas.\n" "Chaves têm de ser inseridas manualmente na primeira vez." #: editor/plugins/canvas_item_editor_plugin.cpp @@ -6410,7 +6426,7 @@ msgstr "Criar mapa UV" msgid "" "Polygon 2D has internal vertices, so it can no longer be edited in the " "viewport." -msgstr "Polygon 2D tem vértices internos, não podendo ser editado no viewport." +msgstr "Polygon 2D tem vértices internos, não poder ser editado no viewport." #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Create Polygon & UV" @@ -6503,7 +6519,7 @@ msgstr "Escalar PolÃgono" #: editor/plugins/polygon_2d_editor_plugin.cpp msgid "Create a custom polygon. Enables custom polygon rendering." msgstr "" -"Crie um polÃgono personalizado. Habilita a renderização de polÃgonos " +"Crie um polÃgono personalizado. Ativa a renderização de polÃgonos " "personalizados." #: editor/plugins/polygon_2d_editor_plugin.cpp @@ -7756,7 +7772,8 @@ msgid "New Animation" msgstr "Nova Animação" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "Velocidade (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -9011,7 +9028,7 @@ msgstr "" "\n" "Devolve 0.0 se 'x' for menor que 'limite0' e 1.0 se 'x' for maior que " "'limite1'. Caso contrário o valor devolvido é interpolado entre 0.0 and 1.0 " -"usando polinomiais Hermite." +"a usar polinomiais Hermite." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9101,9 +9118,9 @@ msgstr "" "\n" "OuterProduct trata o primeiro parâmetro 'c' como um vetor coluna (matriz com " "uma coluna) e o segundo parâmetro 'r' como um vetor linha (matriz com uma " -"linha) e faz uma multiplicação matricial algébrica linear 'c * r', " -"resultando uma matriz cujo número de linhas é o número de componentes em 'c' " -"e cujo número de colunas é o número de componentes de 'r'." +"linha) e faz uma multiplicação matricial algébrica linear 'c * r', a " +"resultar uma matriz cujo número de linhas é o número de componentes em 'c' e " +"cujo número de colunas é o número de componentes de 'r'." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Composes transform from four vectors." @@ -9191,7 +9208,7 @@ msgstr "Interpolação linear entre dois vetores." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Linear interpolation between two vectors using scalar." -msgstr "Interpolação linear entre dois vetores usando um escalar." +msgstr "Interpolação linear entre dois vetores a usar um escalar." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Calculates the normalize product of vector." @@ -9229,7 +9246,7 @@ msgstr "" "\n" "Devolve 0.0 se 'x' for menor que 'limite0' e 1.0 se 'x' for maior que " "'limite1'. Caso contrário o valor devolvido é interpolado entre 0.0 and 1.0 " -"usando polinomiais Hermite." +"a usar polinomiais Hermite." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9243,7 +9260,7 @@ msgstr "" "\n" "Devolve 0.0 se 'x' for menor que 'limite0' e 1.0 se 'x' for maior que " "'limite1'. Caso contrário o valor devolvido é interpolado entre 0.0 and 1.0 " -"usando polinomiais Hermite." +"a usar polinomiais Hermite." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" @@ -9319,7 +9336,7 @@ msgid "" "it later in the Expressions. You can also declare varyings, uniforms and " "constants." msgstr "" -"Expressão personalizada em Linguagem Godot Shader, colocada sobre o shader " +"Expressão personalizada em Linguagem Godot Shader, posta sobre o shader " "resultante. Pode pôr várias definições de função e chamá-las depois nas " "Expressões. Também pode declarar variantes, uniformes e constantes." @@ -9335,14 +9352,14 @@ msgstr "(Apenas modo Fragment/Light) Função derivada vetorial." msgid "" "(Fragment/Light mode only) (Vector) Derivative in 'x' using local " "differencing." -msgstr "(Apenas modo Fragment/Light) Derivada em 'x' usando derivação local." +msgstr "(Apenas modo Fragment/Light) Derivada em 'x' a usar derivação local." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "(Fragment/Light mode only) (Scalar) Derivative in 'x' using local " "differencing." msgstr "" -"(Apenas modo Fragment/Light) (Escalar) Derivada em 'x' usando derivação " +"(Apenas modo Fragment/Light) (Escalar) Derivada em 'x' a usar derivação " "local." #: editor/plugins/visual_shader_editor_plugin.cpp @@ -9350,14 +9367,14 @@ msgid "" "(Fragment/Light mode only) (Vector) Derivative in 'y' using local " "differencing." msgstr "" -"(Apenas modo Fragment/Light) (Vetor) Derivada em 'y' usando derivação local." +"(Apenas modo Fragment/Light) (Vetor) Derivada em 'y' a usar derivação local." #: editor/plugins/visual_shader_editor_plugin.cpp msgid "" "(Fragment/Light mode only) (Scalar) Derivative in 'y' using local " "differencing." msgstr "" -"(Apenas modo Fragment/Light) (Escalar) Derivada em 'y' usando derivação " +"(Apenas modo Fragment/Light) (Escalar) Derivada em 'y' a usar derivação " "local." #: editor/plugins/visual_shader_editor_plugin.cpp @@ -9822,8 +9839,8 @@ msgid "" "the \"Application\" category." msgstr "" "Não consigo executar o projeto: cena principal não definida.\n" -"Edite o projeto e defina a cena principal em Definições do Projeto dentro da " -"categoria \"Aplicação\"." +"Edite o projeto e defina a cena principal em Configurações do Projeto dentro " +"da categoria \"Application\"." #: editor/project_manager.cpp msgid "" @@ -10164,7 +10181,7 @@ msgstr "Modo filtro de localização alterado" #: editor/project_settings_editor.cpp msgid "Project Settings (project.godot)" -msgstr "Definições do Projeto (project.godot)" +msgstr "Configurações do Projeto (project.godot)" #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "General" @@ -10319,11 +10336,18 @@ msgid "Batch Rename" msgstr "Renomear em massa" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Substituir: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "Prefixo" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "Sufixo" #: editor/rename_dialog.cpp @@ -10371,7 +10395,8 @@ msgid "Per-level Counter" msgstr "Contador por nÃvel" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "Se definido o contador reinicia para cada grupo de nós filhos" #: editor/rename_dialog.cpp @@ -10431,7 +10456,8 @@ msgid "Reset" msgstr "Repor" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "Erro em Expressão Regular" #: editor/rename_dialog.cpp @@ -11897,7 +11923,7 @@ msgstr "VariableSet não encontrado no script: " #: modules/visual_script/visual_script_nodes.cpp msgid "Custom node has no _step() method, can't process graph." msgstr "" -"Nó personalizado não tem método _step(), não podendo processar um gráfico." +"Nó personalizado não tem método _step(), sem poder processar um gráfico." #: modules/visual_script/visual_script_nodes.cpp msgid "" @@ -12206,7 +12232,7 @@ msgid "" "Consider adding a CollisionShape2D or CollisionPolygon2D as a child to " "define its shape." msgstr "" -"Este nó não tem forma, não podendo colidir ou interagir com outros objetos.\n" +"Este nó não tem forma, em poder colidir ou interagir com outros objetos.\n" "Considere adicionar nós CollisionShape2D ou CollisionPolygon2D como filhos " "para definir a sua forma." @@ -12315,7 +12341,7 @@ msgid "" "A material to process the particles is not assigned, so no behavior is " "imprinted." msgstr "" -"Não foi atribuÃdo um Material para processar as partÃculas, não possuindo um " +"Não foi atribuÃdo um Material para processar as partÃculas, sem possuir um " "comportamento." #: scene/2d/particles_2d.cpp @@ -12440,7 +12466,7 @@ msgid "" "Consider adding a CollisionShape or CollisionPolygon as a child to define " "its shape." msgstr "" -"Este nó não tem forma, não podendo colidir ou interagir com outros objetos.\n" +"Este nó não tem forma, sem poder colidir ou interagir com outros objetos.\n" "Considere adicionar nós CollisionShape ou CollisionPolygon como filhos para " "definir a sua forma." @@ -12513,6 +12539,11 @@ msgstr "" "Sondas GI não são suportadas pelo driver vÃdeo GLES2.\n" "Em vez disso, use um BakedLightmap." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "Uma SpotLight com ângulo superior a 90 graus não cria sombras." @@ -12564,8 +12595,8 @@ msgid "" "PathFollow's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its " "parent Path's Curve resource." msgstr "" -"ROTATION_ORIENTED de PathFollow requer \"Up Vector\" habilitado no recurso " -"de Curva do Caminho do seu pai." +"ROTATION_ORIENTED de PathFollow requer \"Up Vector\" ativado no recurso de " +"Curva do Caminho do seu pai." #: scene/3d/physics_body.cpp msgid "" @@ -12665,7 +12696,7 @@ msgstr "Não foi definida uma raiz AnimationNode para o gráfico." #: scene/animation/animation_tree.cpp msgid "Path to an AnimationPlayer node containing animations is not set." msgstr "" -"Caminho para um nó AnimationPlayer contendo animações não está definido." +"Caminho para um nó AnimationPlayer a conter animações não está definido." #: scene/animation/animation_tree.cpp msgid "Path set for AnimationPlayer does not lead to an AnimationPlayer node." @@ -12770,7 +12801,7 @@ msgid "" "Default Environment as specified in Project Settings (Rendering -> " "Environment -> Default Environment) could not be loaded." msgstr "" -"Ambiente predefinido especificado em Configuração do Projeto (Rendering -> " +"Ambiente predefinido especificado em Configurações do Projeto (Rendering -> " "Environment -> Default Environment) não pode ser carregado." #: scene/main/viewport.cpp @@ -12817,6 +12848,16 @@ msgstr "Variações só podem ser atribuÃdas na função vértice." msgid "Constants cannot be modified." msgstr "Constantes não podem ser modificadas." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Sistema de Ficheiros e Docas de Importação" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Ao exportar ou distribuir, o executável vai tentar ligar-se ao IP deste " +#~ "computador para depuração." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "A cena atual nunca foi guardada, por favor guarde-a antes de executar." diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po index 3e9e709aab..29b0350e10 100644 --- a/editor/translations/pt_BR.po +++ b/editor/translations/pt_BR.po @@ -99,12 +99,13 @@ # GUILHERME SOUZA REIS DE MELO LOPES <guilhermesrml@unipam.edu.br>, 2020. # Gabriela Araújo <Gabirin@outlook.com.br>, 2020. # Jairo Tuboi <tuboi.jairo@gmail.com>, 2020. +# Felipe Fetter <felipetfetter@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: 2016-05-30\n" -"PO-Revision-Date: 2020-08-11 14:04+0000\n" -"Last-Translator: Jairo Tuboi <tuboi.jairo@gmail.com>\n" +"PO-Revision-Date: 2020-09-12 00:46+0000\n" +"Last-Translator: Felipe Fetter <felipetfetter@gmail.com>\n" "Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/" "godot-engine/godot/pt_BR/>\n" "Language: pt_BR\n" @@ -112,7 +113,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.2-dev\n" +"X-Generator: Weblate 4.3-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -621,6 +622,7 @@ msgid "Seconds" msgstr "Segundos" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -799,7 +801,7 @@ msgstr "Caso de correspondência" msgid "Whole Words" msgstr "Palavras Inteiras" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Substituir" @@ -991,6 +993,11 @@ msgid "Signals" msgstr "Sinais" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtros do tile" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Tem certeza que quer remover todas conexões desse sinal?" @@ -1028,7 +1035,7 @@ msgid "Recent:" msgstr "Recente:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Pesquisar:" @@ -1233,14 +1240,12 @@ msgid "Gold Sponsors" msgstr "Patrocinadores Ouro" #: editor/editor_about.cpp -#, fuzzy msgid "Silver Sponsors" -msgstr "Doadores Prata" +msgstr "Patrocinadores Prata" #: editor/editor_about.cpp -#, fuzzy msgid "Bronze Sponsors" -msgstr "Doadores Bronze" +msgstr "Patrocinadores Bronze" #: editor/editor_about.cpp msgid "Mini Sponsors" @@ -1718,16 +1723,17 @@ msgid "Scene Tree Editing" msgstr "Edição da Ãrvore de Cena" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Importar Dock" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Painel de Nós" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Sistema de Arquivos e Importar Docks" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Arquivos" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Importar Dock" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1990,7 +1996,7 @@ msgstr "Diretórios & Arquivos:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Previsualização:" @@ -2872,24 +2878,28 @@ msgstr "Distribuir com Depuragem Remota" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Quando exportando ou instalando, o programa resultante tentará conectar ao " -"IP deste computador para poder ser depurado." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Pequena DIstribuição com Sistema de Arquivos de Rede" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Quando esta opção está habilitada, a exportação ou instalação produzirá um " "executável mÃnimo.\n" @@ -2902,9 +2912,10 @@ msgid "Visible Collision Shapes" msgstr "Formas de Colisão VisÃveis" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Formas de colisão e nós do tipo RayCast (2D e 3D) serão visÃveis durante a " "execução do jogo caso esta opção esteja habilitada." @@ -2914,23 +2925,26 @@ msgid "Visible Navigation" msgstr "Navegação VisÃvel" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Malhas e polÃgonos de navegação serão visÃveis no jogo em execução se esta " "opção estiver ligada." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Sincronizar Mudanças de Cena" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Quando essa opção está ativa, quaisquer alterações feitas à cena no editor " "serão replicadas no jogo em execução.\n" @@ -2938,15 +2952,17 @@ msgstr "" "sistema de arquivos via rede." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Sincronizar Mudanças de Script" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Quando essa opção está ativa, qualquer script que é salvo será recarregado " "no jogo em execução.\n" @@ -3010,7 +3026,7 @@ msgstr "Ajuda" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Pesquisar" @@ -3429,9 +3445,11 @@ msgid "Add Key/Value Pair" msgstr "Adicionar Par de Chave/Valor" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Não foi encontrado uma definição de exportação executável para esta " "plataforma.\n" @@ -5206,7 +5224,7 @@ msgid "Bake Lightmaps" msgstr "Preparar Lightmaps" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Visualização" @@ -7854,7 +7872,8 @@ msgid "New Animation" msgstr "Nova animação" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "Velocidade (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10420,11 +10439,18 @@ msgid "Batch Rename" msgstr "Renomear em lote" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Substituir: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "Prefixo" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "Sufixo" #: editor/rename_dialog.cpp @@ -10472,7 +10498,8 @@ msgid "Per-level Counter" msgstr "Contador de nÃvel" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "Se definido, o contador será reiniciado para cada grupo de nós filhos" #: editor/rename_dialog.cpp @@ -10532,7 +10559,8 @@ msgid "Reset" msgstr "Recompor" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "Erro de Expressão Regular" #: editor/rename_dialog.cpp @@ -12616,6 +12644,11 @@ msgstr "" "GIProbes não são suportados pelo driver de vÃdeo GLES2.\n" "Use um BakedLightmap em vez disso." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "Um SpotLight com um ângulo maior que 90 graus não pode criar sombras." @@ -12923,6 +12956,16 @@ msgstr "Variáveis só podem ser atribuÃdas na função de vértice." msgid "Constants cannot be modified." msgstr "Constantes não podem serem modificadas." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Sistema de Arquivos e Importar Docks" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Quando exportando ou instalando, o programa resultante tentará conectar " +#~ "ao IP deste computador para poder ser depurado." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "A cena atual nunca foi salva. Por favor salve antes de rodá-la." diff --git a/editor/translations/ro.po b/editor/translations/ro.po index 5a8c083d54..1549250858 100644 --- a/editor/translations/ro.po +++ b/editor/translations/ro.po @@ -538,6 +538,7 @@ msgid "Seconds" msgstr "Secunde" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS(cadre pe secundă)" @@ -716,7 +717,7 @@ msgstr "PotriveÈ™te Caz-ul" msgid "Whole Words" msgstr "Cuvinte Complete" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "ÃŽnlocuiÈ›i" @@ -908,6 +909,11 @@ msgid "Signals" msgstr "Semnale" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtrare Tiles" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "EÈ™ti sigur că vrei să È™tergi toate conexiunile de la acest semnal?" @@ -945,7 +951,7 @@ msgid "Recent:" msgstr "Recent:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "CautaÈ›i:" @@ -1640,16 +1646,17 @@ msgid "Scene Tree Editing" msgstr "Editează Arborele Scenei" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Importă Bară" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Nod Bară" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Sistemul De FiÈ™iere È™i încărcare Bare" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Sistemul De FiÈ™iere" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Importă Bară" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1914,7 +1921,7 @@ msgstr "Directoare È™i FiÅŸiere:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "PrevizualizaÈ›i:" @@ -2800,24 +2807,28 @@ msgstr "Lansează cu Depanare la Distanță" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Când exporÈ›i sau lansezi, executabilul rezultat va încerca să se conecteze " -"la IP-ul acestui computer pentru a putea fi depanat." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Mini Lansare cu ReÈ›ea FS" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Când această opÈ›iune este activată, exportarea sau lansarea va produce un " "executabil minimal.\n" @@ -2830,9 +2841,10 @@ msgid "Visible Collision Shapes" msgstr "Forme de Coliziune Vizibile" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Formele de coliziune si nodurile raycast (pentru 2D È™i 3D) vor fi vizibile " "când jocul rulează dacă această opÈ›iune este activată." @@ -2842,23 +2854,26 @@ msgid "Visible Navigation" msgstr "Navigare Vizibilă" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Structurile de navigare È™i poligoanele vor fi vizibile când jocul rulează " "dacă această opÈ›iune este activată." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Sincronizează Modificările Scenei" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Când această opÈ›iune este activată, orice modificare facută în scenă din " "editor va fi replicată în jocul care rulează.\n" @@ -2866,15 +2881,17 @@ msgstr "" "mult mai eficient dacă este folosit un sistem de fiÈ™iere în reÈ›ea." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Sincronizează Modificările Scriptului" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Când această opÈ›iune este activată, orice script salvat ulterior va fi " "reîncărcat în jocul care rulează.\n" @@ -2938,7 +2955,7 @@ msgstr "Ajutor" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Căutare" @@ -3338,9 +3355,11 @@ msgid "Add Key/Value Pair" msgstr "" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Nu a fost găsită nicio presetare de export care să poată rula pentru această " "platformă.\n" @@ -5126,7 +5145,7 @@ msgid "Bake Lightmaps" msgstr "Procesează Lightmaps" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Previzualizare" @@ -7857,7 +7876,7 @@ msgid "New Animation" msgstr "AnimaÈ›ie" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10366,11 +10385,16 @@ msgid "Batch Rename" msgstr "RedenumeÈ™te" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "ÃŽnlocuiÈ›i: " + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10418,7 +10442,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10477,8 +10501,9 @@ msgid "Reset" msgstr "ResetaÈ›i Zoom-area" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" -msgstr "" +#, fuzzy +msgid "Regular Expression Error:" +msgstr "FolosiÈ›i expresii regulate" #: editor/rename_dialog.cpp msgid "At character %s" @@ -12471,6 +12496,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12725,6 +12755,16 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Sistemul De FiÈ™iere È™i încărcare Bare" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Când exporÈ›i sau lansezi, executabilul rezultat va încerca să se " +#~ "conecteze la IP-ul acestui computer pentru a putea fi depanat." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "Scena curentă nu a fost salvată niciodată, salvaÈ›i-o înainte de rulare." diff --git a/editor/translations/ru.po b/editor/translations/ru.po index 9e0ecb8e8d..2c85fe4e8c 100644 --- a/editor/translations/ru.po +++ b/editor/translations/ru.po @@ -91,8 +91,8 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-09-08 11:40+0000\n" -"Last-Translator: Nikita Epifanov <nikgreens@protonmail.com>\n" +"PO-Revision-Date: 2020-09-15 07:17+0000\n" +"Last-Translator: Danil Alexeev <danil@alexeev.xyz>\n" "Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/" "godot/ru/>\n" "Language: ru\n" @@ -306,7 +306,7 @@ msgstr "ПродолжительноÑÑ‚ÑŒ анимации (в Ñекундах #: editor/animation_track_editor.cpp msgid "Add Track" -msgstr "Добавить новый трек" +msgstr "Добавить трек" #: editor/animation_track_editor.cpp msgid "Animation Looping" @@ -327,7 +327,7 @@ msgstr "Дорожки анимации:" #: editor/animation_track_editor.cpp msgid "Change Track Path" -msgstr "Изменить Путь СледованиÑ" +msgstr "Изменить путь трека" #: editor/animation_track_editor.cpp msgid "Toggle this track on/off." @@ -335,7 +335,7 @@ msgstr "Включить/выключить Ñтот трек." #: editor/animation_track_editor.cpp msgid "Update Mode (How this property is set)" -msgstr "Режим ÐžÐ±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ (Как Ñто ÑвойÑтво уÑтанавливаетÑÑ)" +msgstr "Режим Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ (как Ñто ÑвойÑтво уÑтанавливаетÑÑ)" #: editor/animation_track_editor.cpp msgid "Interpolation Mode" @@ -384,7 +384,7 @@ msgstr "Линейный" #: editor/animation_track_editor.cpp msgid "Cubic" -msgstr "КубичеÑкаÑ" +msgstr "КубичеÑкий" #: editor/animation_track_editor.cpp msgid "Clamp Loop Interp" @@ -611,6 +611,7 @@ msgid "Seconds" msgstr "Секунды" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -789,7 +790,7 @@ msgstr "Учитывать региÑÑ‚Ñ€" msgid "Whole Words" msgstr "Целые Ñлова" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Заменить" @@ -982,6 +983,11 @@ msgid "Signals" msgstr "Сигналы" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Фильтр тайлов" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Ð’Ñ‹ уверены, что хотите удалить вÑе Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð¾Ñ‚ Ñигнала?" @@ -1019,7 +1025,7 @@ msgid "Recent:" msgstr "Ðедавнее:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "ПоиÑк:" @@ -1706,16 +1712,17 @@ msgid "Scene Tree Editing" msgstr "Редактирование дерева Ñцены" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Панель «Импорт»" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Панель «Узел»" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Панели Â«Ð¤Ð°Ð¹Ð»Ð¾Ð²Ð°Ñ ÑиÑтема» и «Импорт»" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Ð¤Ð°Ð¹Ð»Ð¾Ð²Ð°Ñ ÑиÑтема" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Панель «Импорт»" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1932,7 +1939,7 @@ msgstr "Режим отображениÑ" #: editor/editor_file_dialog.cpp msgid "Focus Path" -msgstr "Ð¤Ð¾ÐºÑƒÑ Ð½Ð° пути" +msgstr "ПеремеÑтить Ñ„Ð¾ÐºÑƒÑ Ð½Ð° Ñтроку пути" #: editor/editor_file_dialog.cpp msgid "Move Favorite Up" @@ -1980,7 +1987,7 @@ msgstr "Каталоги и файлы:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "ПредпроÑмотр:" @@ -2790,12 +2797,12 @@ msgstr "Ðабор тайлов..." #: editor/editor_node.cpp editor/plugins/script_text_editor.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp msgid "Undo" -msgstr "Отменить (Undo)" +msgstr "Отменить" #: editor/editor_node.cpp editor/plugins/script_text_editor.cpp #: scene/gui/line_edit.cpp scene/gui/text_edit.cpp msgid "Redo" -msgstr "Повторить (Redo)" +msgstr "Повторить" #: editor/editor_node.cpp msgid "Miscellaneous project or scene-wide tools." @@ -2857,24 +2864,28 @@ msgstr "Развернуть Ñ ÑƒÐ´Ð°Ð»Ñ‘Ð½Ð½Ð¾Ð¹ отладкой" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"При ÑкÑпорте или развёртывании, полученный иÑполнÑемый файл будет пытатьÑÑ " -"подключитьÑÑ Ðº IP Ñтого компьютера Ñ Ñ†ÐµÐ»ÑŒÑŽ отладки." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Ðебольшое развёртывание через Ñеть" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Когда Ñта Ð¾Ð¿Ñ†Ð¸Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð°, ÑкÑпорт или развёртывание будет Ñоздавать " "минимальный иÑполнÑемый файл.\n" @@ -2887,9 +2898,10 @@ msgid "Visible Collision Shapes" msgstr "Видимые облаÑти ÑоприкоÑновениÑ" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Когда Ñта Ð¾Ð¿Ñ†Ð¸Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð°, облаÑти ÑоприкоÑновений и узлы Raycast(в 2D и 3D) " "будут видимыми в запущенной игре." @@ -2899,23 +2911,26 @@ msgid "Visible Navigation" msgstr "Ð’Ð¸Ð´Ð¸Ð¼Ð°Ñ Ð½Ð°Ð²Ð¸Ð³Ð°Ñ†Ð¸Ñ" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Когда Ñта Ð¾Ð¿Ñ†Ð¸Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð°, навигационные полиÑетки и полигоны будут видимыми " "в запущенной игре." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Ð¡Ð¸Ð½Ñ…Ñ€Ð¾Ð½Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ð¹ в Ñцене" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Когда Ñта Ð¾Ð¿Ñ†Ð¸Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð°, вÑе изменениÑ, внеÑённые на Ñцену, в редакторе " "будут перенеÑены в запущенную игру.\n" @@ -2923,15 +2938,17 @@ msgstr "" "Ñетевой файловой ÑиÑтемой." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Ð¡Ð¸Ð½Ñ…Ñ€Ð¾Ð½Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ð¹ в Ñкриптах" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Когда Ñта Ð¾Ð¿Ñ†Ð¸Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð°, любой Ñохранённый Ñкрипт будет перезагружен в " "запущенную игру.\n" @@ -2995,7 +3012,7 @@ msgstr "Справка" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "ПоиÑк" @@ -3414,9 +3431,11 @@ msgid "Add Key/Value Pair" msgstr "Добавить пару: Ключ/Значение" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Ðе найден рабочий ÑкÑпортер Ð´Ð»Ñ Ñтой платформы.\n" "ПожалуйÑта, добавьте его в меню ÑкÑпорта." @@ -5181,7 +5200,7 @@ msgid "Bake Lightmaps" msgstr "Запекать карты оÑвещениÑ" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "ПредпроÑмотр" @@ -7828,7 +7847,8 @@ msgid "New Animation" msgstr "ÐÐ¾Ð²Ð°Ñ Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "СкороÑÑ‚ÑŒ (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10392,11 +10412,18 @@ msgid "Batch Rename" msgstr "Групповое переименование" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Заменить: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "ПрефикÑ" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "СуффикÑ" #: editor/rename_dialog.cpp @@ -10444,7 +10471,8 @@ msgid "Per-level Counter" msgstr "Счетчик Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ уровнÑ" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "" "ЕÑли уÑтановить, Ñчетчик перезапуÑтитÑÑ Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð¹ группы дочерних узлов" @@ -10506,7 +10534,8 @@ msgid "Reset" msgstr "СброÑить" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "Ошибка в регулÑрном выражении" #: editor/rename_dialog.cpp @@ -12035,14 +12064,13 @@ msgstr "OpenJDK jarsigner не наÑтроен в ÐаÑтройках Реда #: platform/android/export/export.cpp msgid "Debug keystore not configured in the Editor Settings nor in the preset." msgstr "" -"ÐžÑ‚Ð»Ð°Ð´Ð¾Ñ‡Ð½Ð°Ñ ÐºÐ»Ð°Ð²Ð¸Ð°Ñ‚ÑƒÑ€Ð° не наÑтроена ни в наÑтройках редактора, ни в " +"Отладочное хранилище ключей не наÑтроено ни в наÑтройках редактора, ни в " "предуÑтановках." #: platform/android/export/export.cpp msgid "Release keystore incorrectly configured in the export preset." msgstr "" -"ÐžÑ‚Ð»Ð°Ð´Ð¾Ñ‡Ð½Ð°Ñ ÐºÐ»Ð°Ð²Ð¸Ð°Ñ‚ÑƒÑ€Ð° не наÑтроена ни в наÑтройках редактора, ни в " -"предуÑтановках." +"Хранилище ключей не наÑтроено ни в наÑтройках редактора, ни в предуÑтановках." #: platform/android/export/export.cpp msgid "Custom build requires a valid Android SDK path in Editor Settings." @@ -12588,6 +12616,11 @@ msgstr "" "GIProbes не поддерживаютÑÑ Ð²Ð¸Ð´ÐµÐ¾Ð´Ñ€Ð°Ð¹Ð²ÐµÑ€Ð¾Ð¼ GLES2.\n" "ВмеÑто Ñтого иÑпользуйте BakedLightmap." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "SpotLight Ñ ÑƒÐ³Ð»Ð¾Ð¼ более 90 градуÑов не может отбраÑывать тени." @@ -12892,6 +12925,16 @@ msgstr "Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð³ÑƒÑ‚ быть назначены только Ð msgid "Constants cannot be modified." msgstr "КонÑтанты не могут быть изменены." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Панели Â«Ð¤Ð°Ð¹Ð»Ð¾Ð²Ð°Ñ ÑиÑтема» и «Импорт»" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "При ÑкÑпорте или развёртывании, полученный иÑполнÑемый файл будет " +#~ "пытатьÑÑ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡Ð¸Ñ‚ÑŒÑÑ Ðº IP Ñтого компьютера Ñ Ñ†ÐµÐ»ÑŒÑŽ отладки." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ñцена никогда не была Ñохранена, Ñохраните её перед запуÑком." diff --git a/editor/translations/si.po b/editor/translations/si.po index 6db6ba355a..d474b218ba 100644 --- a/editor/translations/si.po +++ b/editor/translations/si.po @@ -527,6 +527,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -706,7 +707,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "" @@ -896,6 +897,10 @@ msgid "Signals" msgstr "" #: editor/connections_dialog.cpp +msgid "Filter signals" +msgstr "" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -933,7 +938,7 @@ msgid "Recent:" msgstr "" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "" @@ -1602,15 +1607,15 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" +msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Node Dock" +msgid "FileSystem Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1873,7 +1878,7 @@ msgstr "" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2700,22 +2705,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2724,8 +2733,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2734,32 +2743,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2819,7 +2828,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3220,7 +3229,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -4957,7 +4967,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7558,7 +7568,7 @@ msgid "New Animation" msgstr "සජීවීකරණ පුනරà·à·€à¶»à·Šà¶®à¶±à¶º" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -9984,11 +9994,15 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +msgid "Replace:" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10034,7 +10048,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10092,7 +10106,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -12038,6 +12052,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/sk.po b/editor/translations/sk.po index 7a5bd57c4c..9ef7eb1d1a 100644 --- a/editor/translations/sk.po +++ b/editor/translations/sk.po @@ -528,6 +528,7 @@ msgid "Seconds" msgstr "Sekundy" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -706,7 +707,7 @@ msgstr "Match Case" msgid "Whole Words" msgstr "Celé slová" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "NahradiÅ¥" @@ -897,6 +898,11 @@ msgid "Signals" msgstr "Signály" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filter:" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Naozaj chcete odstrániÅ¥ vÅ¡etky pripojenia z tohto signálu?" @@ -934,7 +940,7 @@ msgid "Recent:" msgstr "Nedávne:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "HľadaÅ¥:" @@ -1621,16 +1627,17 @@ msgid "Scene Tree Editing" msgstr "Editovanie Stromu Scén" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "ImportovaÅ¥ Dock" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Node Dock" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Systém súborov a Import Dock-y" +#, fuzzy +msgid "FileSystem Dock" +msgstr "FileSystém" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "ImportovaÅ¥ Dock" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1894,7 +1901,7 @@ msgstr "PrieÄinky a Súbory:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "PredzobraziÅ¥:" @@ -2771,24 +2778,28 @@ msgstr "Deploy-ovanie z Remote Debug-om" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Pri exportovanà alebo deploy-ovanÃ, súbor resulting executable sa pokúsi o " -"pripojenie do IP vášho poÄÃtaÄa aby mohol byÅ¥ debugg-ovaný." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Malý Deploy z Network FS" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "KeÄ bude povolená táto možnosÅ¥, export alebo deploy vyprodukujú menej \n" "súboru executable.\n" @@ -2801,9 +2812,10 @@ msgid "Visible Collision Shapes" msgstr "Viditeľné Tvary KolÃzie" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Tvary KolÃzie a raycast node-y (pre 2D a 3D) budú viditeľné po spustenà hry " "ak budete maÅ¥ zapnutú túto možnosÅ¥." @@ -2813,23 +2825,26 @@ msgid "Visible Navigation" msgstr "Viditeľná Navigácia" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "NavigaÄné mesh-e a polygony budú viditeľné po spustenà hry ak budete maÅ¥ " "zapnutú túto možnosÅ¥." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Zmeny Synchronizácie Scény" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "KeÄ zapnete túto možnosÅ¥, akékoľvek zmeny v scéne v editore budú náhradné so " "spustenou hrou.\n" @@ -2837,15 +2852,17 @@ msgstr "" "filesystémom." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Zmeny Synchronizácie Scriptu" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "KeÄ je zapnutá táto MožnosÅ¥, akýkoľvek uložený script bude znovu naÄÃtaný v " "spustenej hre.\n" @@ -2909,7 +2926,7 @@ msgstr "Pomoc" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "VyhľadaÅ¥" @@ -3325,9 +3342,11 @@ msgid "Add Key/Value Pair" msgstr "PridaÅ¥ KľúÄ/Hodnota \"Pair\"" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Pre túto platformu sa nenaÅ¡iel žiadny spustiteľný \"export preset\" .\n" "ProsÃm pridajte spustiteľný \"preset\" v export menu." @@ -5088,7 +5107,7 @@ msgid "Bake Lightmaps" msgstr "Bake Lightmaps" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "PredzobraziÅ¥" @@ -7744,7 +7763,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10261,11 +10280,16 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "NahradiÅ¥: " + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10311,7 +10335,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10369,7 +10393,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -12382,6 +12406,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12636,6 +12665,16 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Systém súborov a Import Dock-y" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Pri exportovanà alebo deploy-ovanÃ, súbor resulting executable sa pokúsi " +#~ "o pripojenie do IP vášho poÄÃtaÄa aby mohol byÅ¥ debugg-ovaný." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "Aktuálna scéna sa nikdy neuložila, prosÃm uložte ju pred spustenÃm." diff --git a/editor/translations/sl.po b/editor/translations/sl.po index b095b4d9b7..a97fb1ae39 100644 --- a/editor/translations/sl.po +++ b/editor/translations/sl.po @@ -555,6 +555,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -743,7 +744,7 @@ msgstr "Ujemanje Velikih ÄŒrk" msgid "Whole Words" msgstr "Cele Besede" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Zamenjaj" @@ -947,6 +948,11 @@ msgid "Signals" msgstr "Signali" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtriraj datoteke..." + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -987,7 +993,7 @@ msgid "Recent:" msgstr "Nedavni:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Iskanje:" @@ -1694,21 +1700,21 @@ msgstr "" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "Import Dock" -msgstr "Uvozi" - -#: editor/editor_feature_profile.cpp -#, fuzzy msgid "Node Dock" msgstr "NaÄin Premika" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "FileSystem and Import Docks" +msgid "FileSystem Dock" msgstr "DatoteÄniSistem" #: editor/editor_feature_profile.cpp #, fuzzy +msgid "Import Dock" +msgstr "Uvozi" + +#: editor/editor_feature_profile.cpp +#, fuzzy msgid "Erase profile '%s'? (no undo)" msgstr "Zamenjaj Vse" @@ -1997,7 +2003,7 @@ msgstr "Mape & Datoteke:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Predogled:" @@ -2907,24 +2913,28 @@ msgstr "Uvajanje z Oddaljenim RazhroÅ¡Äevanjem" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Pri izvažanju ali uvajanju se bo konÄna izvrÅ¡ljiva datoteka razhroÅ¡Äevala, " -"tako da se bo skuÅ¡ala povezati z IP-jem tega raÄunalnika." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Kratko Uvajanje z Omrežjem FS" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Ko je ta možnost omogoÄena, se bo pri izvozu ali uvajanju ustvarila " "minimalna izvrÅ¡ljiva datoteka.\n" @@ -2937,9 +2947,10 @@ msgid "Visible Collision Shapes" msgstr "Vidne Oblike Trka" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Gradniki oblike trka in prikaz žarka (za 2D in 3D) bodo vidni pri poteku " "igre, Äe je ta možnost vklopljena." @@ -2949,37 +2960,42 @@ msgid "Visible Navigation" msgstr "Vidna Navigacija" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "ÄŒe je ta možnost vkljuÄena, bodo navigacijske oblike in poligoni vidni pri " "poteku igre." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Usklajuj Spremembe Prizora" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Ko je ta možnost vkljuÄena, bodo vse spremebe v prizoru ali urejevalniku " "ponovljene med potekom igre." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Usklajuj Spremembe Skript" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "ÄŒe je ta možnost vkljuÄena, bo vsaka shranjena skripta ponovno naložena v " "igro, ki se izvaja.\n" @@ -3051,7 +3067,7 @@ msgstr "PomoÄ" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Iskanje" @@ -3466,9 +3482,11 @@ msgid "Add Key/Value Pair" msgstr "" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Za to platformo ni mogoÄe najti obstojeÄih izvoznih nastavitev.\n" "V izvoznem meniju dodajte svoje nastavitve." @@ -5338,7 +5356,7 @@ msgid "Bake Lightmaps" msgstr "ZapeÄi Svetlobne karte" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Predogled" @@ -8078,7 +8096,7 @@ msgid "New Animation" msgstr "Animacija" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10620,11 +10638,16 @@ msgid "Batch Rename" msgstr "Preimenuj" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Zamenjaj" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10676,7 +10699,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10736,8 +10759,9 @@ msgid "Reset" msgstr "Ponastavi PoveÄavo/PomanjÅ¡avo" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" -msgstr "" +#, fuzzy +msgid "Regular Expression Error:" +msgstr "Trenutna RazliÄica:" #: editor/rename_dialog.cpp #, fuzzy @@ -12789,6 +12813,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -13056,6 +13085,17 @@ msgstr "" msgid "Constants cannot be modified." msgstr "Konstante ni možno spreminjati." +#, fuzzy +#~ msgid "FileSystem and Import Docks" +#~ msgstr "DatoteÄniSistem" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Pri izvažanju ali uvajanju se bo konÄna izvrÅ¡ljiva datoteka " +#~ "razhroÅ¡Äevala, tako da se bo skuÅ¡ala povezati z IP-jem tega raÄunalnika." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "Trenutna scena ni bila shranjena, shranite jo pred zagonom." diff --git a/editor/translations/sq.po b/editor/translations/sq.po index b4789e5591..6dd423a048 100644 --- a/editor/translations/sq.po +++ b/editor/translations/sq.po @@ -513,6 +513,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -694,7 +695,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "" @@ -892,6 +893,11 @@ msgid "Signals" msgstr "Sinjalet" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtro Skedarët..." + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "A jeni i sigurt që doni të hiqni të gjitha lidhjet nga ky sinjal?" @@ -929,7 +935,7 @@ msgid "Recent:" msgstr "Të fundit:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Kërko:" @@ -1641,21 +1647,21 @@ msgstr "" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "Import Dock" -msgstr "Importo" - -#: editor/editor_feature_profile.cpp -#, fuzzy msgid "Node Dock" msgstr "Nyje" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "FileSystem and Import Docks" +msgid "FileSystem Dock" msgstr "FileSystem" #: editor/editor_feature_profile.cpp #, fuzzy +msgid "Import Dock" +msgstr "Importo" + +#: editor/editor_feature_profile.cpp +#, fuzzy msgid "Erase profile '%s'? (no undo)" msgstr "Zëvendëso të gjitha (pa kthim pas)" @@ -1934,7 +1940,7 @@ msgstr "Direktorit & Skedarët:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Shikim paraprak:" @@ -2836,24 +2842,28 @@ msgstr "Dorëzo me Rregullim në Largësi" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Kur eksporton ose dorëzon, rezultati i ekzekutueshëm do të tentoj të lidhet " -"me IP-në e këtij kompjuteri në mënyrë që të rregullohet." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Dorëzim i Vogël me Rrjet FS" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Kur ky opsion është i aktivizuar, eksportimi ose dorëzimi do të prodhojë një " "të ekzekutueshëm minimal.\n" @@ -2866,9 +2876,10 @@ msgid "Visible Collision Shapes" msgstr "Format e Përplasjes të Dukshme" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Format e përplasjes dhe nyjet 'raycast' (për 2D dhe 3D) do të jenë të " "dukshme gjatë ekzekutimit të lojës nëse ky opsion është i aktivizuar." @@ -2878,38 +2889,43 @@ msgid "Visible Navigation" msgstr "Navigim i Dukshëm" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Rrjetat e navigimit dhe poligonet do të jenë të dukshme gjatë lojës nëse ky " "opsion është i aktivizuar." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Sinkronizo Nryshimet e Skenës" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Kur ky opsion është i aktivizuar, çdo ndryshim i bërë në këtë skenë do të " "kopjohet dhe në lojën duke u ekzekutuar.\n" "Kur përdoret në largësi është më efikas me rrjet 'filesystem'." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Sinkronizo Ndryshimet e Shkrimit" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Kurbky opsion është aktivizuar, çdo shkrim që ruhet do të ringarkohet në " "lojën që është duke u ekzekutuar.\n" @@ -2978,7 +2994,7 @@ msgstr "Ndihmë" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Kërko" @@ -3394,9 +3410,11 @@ msgid "Add Key/Value Pair" msgstr "Shto Palë Çelës/Vlerë" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Nuk u gjet eksport paraprak i saktë për këtë platformë.\n" "Ju lutem shtoni një eksport paraprak të saktë në menu." @@ -5179,7 +5197,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7811,7 +7829,7 @@ msgid "New Animation" msgstr "Animacionin i Ri" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10264,11 +10282,16 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Zëvendëso: " + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10315,7 +10338,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10373,8 +10396,9 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" -msgstr "" +#, fuzzy +msgid "Regular Expression Error:" +msgstr "Versioni Aktual:" #: editor/rename_dialog.cpp #, fuzzy @@ -12359,6 +12383,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12610,6 +12639,17 @@ msgstr "" msgid "Constants cannot be modified." msgstr "" +#, fuzzy +#~ msgid "FileSystem and Import Docks" +#~ msgstr "FileSystem" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Kur eksporton ose dorëzon, rezultati i ekzekutueshëm do të tentoj të " +#~ "lidhet me IP-në e këtij kompjuteri në mënyrë që të rregullohet." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "Skena aktuale nuk është ruajtur më parë, ju lutem ruajeni para se të " diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po index 09a0750482..1c68f56270 100644 --- a/editor/translations/sr_Cyrl.po +++ b/editor/translations/sr_Cyrl.po @@ -593,6 +593,7 @@ msgid "Seconds" msgstr "Секунди" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -786,7 +787,7 @@ msgstr "Подударање великих и малих Ñлова" msgid "Whole Words" msgstr "Целе речи" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Замени" @@ -999,6 +1000,11 @@ msgstr "Сигнали" #: editor/connections_dialog.cpp #, fuzzy +msgid "Filter signals" +msgstr "Филтрирај датотеке..." + +#: editor/connections_dialog.cpp +#, fuzzy msgid "Are you sure you want to remove all connections from this signal?" msgstr "Сугурно желиш да уклониш Ñве везе Ñа овог Ñигнала?" @@ -1042,7 +1048,7 @@ msgid "Recent:" msgstr "ЧеÑте:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Тражи:" @@ -1772,21 +1778,21 @@ msgstr "Едитовање Стабла Сцене" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "Import Dock" -msgstr "Увоз" - -#: editor/editor_feature_profile.cpp -#, fuzzy msgid "Node Dock" msgstr "Режим померања" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "FileSystem and Import Docks" +msgid "FileSystem Dock" msgstr "Датотечни ÑиÑтем" #: editor/editor_feature_profile.cpp #, fuzzy +msgid "Import Dock" +msgstr "Увоз" + +#: editor/editor_feature_profile.cpp +#, fuzzy msgid "Erase profile '%s'? (no undo)" msgstr "Замени Ñве" @@ -2081,7 +2087,7 @@ msgstr "Директоријуми и датотеке:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Преглед:" @@ -3021,24 +3027,28 @@ msgstr "Извршити Ñа удаљеним дебагом" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"При извозу или извршавању, крајља датотека ће покушати да Ñе повеже Ñа " -"адреÑом овог рачунара како би Ñе могла дебаговати." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Мали извоз Ñа Network FS" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Када је ова опција укључена, извоз ће правити датотеку најмање могуће " "величине.\n" @@ -3051,9 +3061,10 @@ msgid "Visible Collision Shapes" msgstr "Видљиви облици Ñудара" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Облици Ñудара и чворова зракова (за 2Д и 3Д) ћу бити видљиви током игре ако " "је ова опција укључена." @@ -3063,23 +3074,26 @@ msgid "Visible Navigation" msgstr "Видљива навигација" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Ðавигационе мреже и полигони ће бити видљиви током игре ако је ова опција " "укључена." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Синхронизуј промене Ñцене" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Када је ова опција укључена, Ñве промене Ñцене ће бити приказане у " "покренутој игри.\n" @@ -3087,15 +3101,17 @@ msgstr "" "мрежним датотечним ÑиÑтемом." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Синхронизуј промене Ñкриптица" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Када је ова опција укључена, Ñве Ñкриптице које Ñе Ñачувају ће бити поново " "учитане у покренутој игри.\n" @@ -3168,7 +3184,7 @@ msgstr "Помоћ" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Тражи" @@ -3628,9 +3644,11 @@ msgid "Add Key/Value Pair" msgstr "Додај Кључ/ВредноÑÑ‚ пар" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "ÐиÑу пронађене поÑтавке извоза за ову платформу.\n" "Молим, додајте поÑтавке у менију за извоз." @@ -5592,7 +5610,7 @@ msgid "Bake Lightmaps" msgstr "Изпеци МапеСенчења" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Преглед" @@ -8509,7 +8527,8 @@ msgid "New Animation" msgstr "Ðнимација" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "Брзина (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -11549,12 +11568,17 @@ msgstr "Преименуј Гомилу" #: editor/rename_dialog.cpp #, fuzzy -msgid "Prefix" +msgid "Replace:" +msgstr "Замени" + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "Предметак" #: editor/rename_dialog.cpp #, fuzzy -msgid "Suffix" +msgid "Suffix:" msgstr "ÐаÑтавак" #: editor/rename_dialog.cpp @@ -11611,7 +11635,7 @@ msgstr "Пред-Ðиво Бројач" #: editor/rename_dialog.cpp #, fuzzy -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "Ðко је поÑтављен, бројач Ñе реÑтартује за Ñваку групу деце чворова" #: editor/rename_dialog.cpp @@ -11685,7 +11709,7 @@ msgstr "РеÑетуј увеличање" #: editor/rename_dialog.cpp #, fuzzy -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "Регуларни Израз Грешка" #: editor/rename_dialog.cpp @@ -14110,6 +14134,11 @@ msgstr "" " \n" "Као замену кориÑти ИÑпеченеСенкеМапу." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp #, fuzzy msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." @@ -14456,6 +14485,17 @@ msgstr "Варијације могу Ñамо бити одређене у фу msgid "Constants cannot be modified." msgstr "КонÑтанте није могуће мењати." +#, fuzzy +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Датотечни ÑиÑтем" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "При извозу или извршавању, крајља датотека ће покушати да Ñе повеже Ñа " +#~ "адреÑом овог рачунара како би Ñе могла дебаговати." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "Тренутна Ñцена није Ñачувана, молим Ñачувајте је пре покретања." diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po index 14f9fd8d1f..ad26751fe5 100644 --- a/editor/translations/sr_Latn.po +++ b/editor/translations/sr_Latn.po @@ -531,6 +531,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -715,7 +716,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "" @@ -905,6 +906,10 @@ msgid "Signals" msgstr "" #: editor/connections_dialog.cpp +msgid "Filter signals" +msgstr "" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -942,7 +947,7 @@ msgid "Recent:" msgstr "" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "" @@ -1611,15 +1616,15 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" +msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Node Dock" +msgid "FileSystem Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1885,7 +1890,7 @@ msgstr "" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2715,22 +2720,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2739,8 +2748,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2749,32 +2758,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2835,7 +2844,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3237,7 +3246,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -4981,7 +4991,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7605,7 +7615,7 @@ msgid "New Animation" msgstr "Optimizuj Animaciju" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10063,11 +10073,15 @@ msgid "Batch Rename" msgstr "Animacija Preimenuj Kanal" #: editor/rename_dialog.cpp -msgid "Prefix" +msgid "Replace:" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10113,7 +10127,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10171,7 +10185,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -12126,6 +12140,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/sv.po b/editor/translations/sv.po index 562939496f..ff50441f17 100644 --- a/editor/translations/sv.po +++ b/editor/translations/sv.po @@ -540,6 +540,7 @@ msgid "Seconds" msgstr "Sekunder" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -718,7 +719,7 @@ msgstr "Matcha gemener/versaler" msgid "Whole Words" msgstr "Hela Ord" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Ersätt" @@ -911,6 +912,11 @@ msgid "Signals" msgstr "Signaler" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Filtrera Filer..." + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Är du säker att du vill ta bort alla kopplingar frÃ¥n denna signal?" @@ -948,7 +954,7 @@ msgid "Recent:" msgstr "Senaste:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Sök:" @@ -1650,17 +1656,18 @@ msgstr "Scenträd (Noder):" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "Import Dock" -msgstr "Importera" +msgid "Node Dock" +msgstr "Node Namn:" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "Node Dock" -msgstr "Node Namn:" +msgid "FileSystem Dock" +msgstr "FilSystem" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "" +#, fuzzy +msgid "Import Dock" +msgstr "Importera" #: editor/editor_feature_profile.cpp #, fuzzy @@ -1948,7 +1955,7 @@ msgstr "Kataloger & Filer:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Förhandsvisning:" @@ -2865,22 +2872,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2889,8 +2900,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2899,32 +2910,34 @@ msgstr "Synlig Navigation" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Synkronisera scenändringar" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Synkronisera skriptändringar" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2987,7 +3000,7 @@ msgstr "Hjälp" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Sök" @@ -3406,7 +3419,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -5254,7 +5268,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Förhandsgranska" @@ -7972,7 +7986,7 @@ msgid "New Animation" msgstr "Animation" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10510,11 +10524,16 @@ msgid "Batch Rename" msgstr "Byt namn" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Ersätt:" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10566,7 +10585,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10628,8 +10647,9 @@ msgid "Reset" msgstr "Ã…terställ Zoom" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" -msgstr "" +#, fuzzy +msgid "Regular Expression Error:" +msgstr "Nuvarande Version:" #: editor/rename_dialog.cpp #, fuzzy @@ -12680,6 +12700,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/ta.po b/editor/translations/ta.po index a6df89a718..bff90ce603 100644 --- a/editor/translations/ta.po +++ b/editor/translations/ta.po @@ -530,6 +530,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -711,7 +712,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "" @@ -901,6 +902,10 @@ msgid "Signals" msgstr "" #: editor/connections_dialog.cpp +msgid "Filter signals" +msgstr "" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -938,7 +943,7 @@ msgid "Recent:" msgstr "" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "" @@ -1607,15 +1612,15 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" +msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Node Dock" +msgid "FileSystem Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1879,7 +1884,7 @@ msgstr "" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2706,22 +2711,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2730,8 +2739,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2740,32 +2749,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2826,7 +2835,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3227,7 +3236,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -4965,7 +4975,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7560,7 +7570,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -9984,11 +9994,15 @@ msgid "Batch Rename" msgstr "அசைவூடà¯à®Ÿà¯ பாதைகà¯à®•à¯ மறà¯à®ªà¯†à®¯à®°à¯ இடà¯" #: editor/rename_dialog.cpp -msgid "Prefix" +msgid "Replace:" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10034,7 +10048,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10092,7 +10106,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -12036,6 +12050,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/te.po b/editor/translations/te.po index ce1fc1d478..2c6d8146e2 100644 --- a/editor/translations/te.po +++ b/editor/translations/te.po @@ -2,11 +2,11 @@ # Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. # Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). # This file is distributed under the same license as the Godot source code. -# suresh p <suresh9247@gmail.com>, 2019. +# suresh p <suresh9247@gmail.com>, 2019, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" -"PO-Revision-Date: 2019-01-16 20:20+0000\n" +"PO-Revision-Date: 2020-09-15 07:17+0000\n" "Last-Translator: suresh p <suresh9247@gmail.com>\n" "Language-Team: Telugu <https://hosted.weblate.org/projects/godot-engine/" "godot/te/>\n" @@ -14,16 +14,17 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8-bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.4-dev\n" +"X-Generator: Weblate 4.3-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp msgid "Invalid type argument to convert(), use TYPE_* constants." msgstr "" +"() కౠమారà±à°šà°¡à°¾à°¨à°¿à°•à°¿ à°ˆ వాదన (argument) సరికాదà±, దానికి TYPE_* à°¸à±à°¥à°¿à°°à°¾à°‚కాలనà±(constants) ఉపయోగించండి." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." -msgstr "" +msgstr "à°¸à±à°Ÿà±à°°à°¿à°‚à°—à±(string ) యొకà±à°• పొడవౠ1 à°…à°•à±à°·à°°à°‚ మాతà±à°°à°®à±‡ ఆశిసà±à°¤à±à°‚ది." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/mono/glue/gd_glue.cpp @@ -39,11 +40,11 @@ msgstr "à°µà±à°¯à°•à±à°¤à±€à°•à°°à°£à°²à±‹ చెలà±à°²à°¨à°¿ ఇనà±à°ªà #: core/math/expression.cpp #, fuzzy msgid "self can't be used because instance is null (not passed)" -msgstr "తనకౠతానà±à°—à°¾ ఉపయోగించà±à°•à±‹à°²à±‡à°¦à± à°Žà°‚à°¦à±à°•à°‚టే instance à°’à°• శూనà±à°¯à°‚ (ఆమోదించబడలేదౠ)" +msgstr "తనకౠతానà±à°—à°¾(self) ఉపయోగించà±à°•à±‹à°²à±‡à°¦à± à°Žà°‚à°¦à±à°•à°‚టే instance à°’à°• శూనà±à°¯à°‚ (ఆమోదించబడలేదౠ)" #: core/math/expression.cpp msgid "Invalid operands to operator %s, %s and %s." -msgstr "" +msgstr "oparator % s,% s మరియౠ% s కౠచెలà±à°²à°¨à°¿ oparands." #: core/math/expression.cpp msgid "Invalid index of type %s for base type %s" @@ -508,6 +509,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -686,7 +688,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "" @@ -875,6 +877,10 @@ msgid "Signals" msgstr "" #: editor/connections_dialog.cpp +msgid "Filter signals" +msgstr "" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -912,7 +918,7 @@ msgid "Recent:" msgstr "" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "" @@ -1581,15 +1587,15 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" +msgid "Node Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Node Dock" +msgid "FileSystem Dock" msgstr "" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1852,7 +1858,7 @@ msgstr "" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2677,22 +2683,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2701,8 +2711,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2711,32 +2721,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2796,7 +2806,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3196,7 +3206,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -4920,7 +4931,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7502,7 +7513,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -9910,11 +9921,15 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +msgid "Replace:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Prefix:" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -9960,7 +9975,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10018,7 +10033,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -11947,6 +11962,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/th.po b/editor/translations/th.po index 1408e9edb3..d1afffd2cd 100644 --- a/editor/translations/th.po +++ b/editor/translations/th.po @@ -517,6 +517,7 @@ msgid "Seconds" msgstr "วินาที" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "เฟรมเรท" @@ -695,7 +696,7 @@ msgstr "ตรงตามà¸à¸±à¸à¸©à¸£à¸žà¸´à¸¡à¸žà¹Œà¹€à¸¥à¹‡à¸-ใหà¸à¹ msgid "Whole Words" msgstr "ทั้งคำ" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "à¹à¸—นที่" @@ -884,6 +885,11 @@ msgid "Signals" msgstr "สัà¸à¸à¸²à¸“" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "ตัวà¸à¸£à¸à¸‡à¹„ทล์" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -921,7 +927,7 @@ msgid "Recent:" msgstr "ล่าสุด:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "ค้นหา:" @@ -1609,18 +1615,18 @@ msgstr "à¹à¸à¹‰à¹„ขผังฉาà¸" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "Import Dock" -msgstr "นำเข้า" +msgid "Node Dock" +msgstr "โหมดเคลื่à¸à¸™à¸¢à¹‰à¸²à¸¢" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "Node Dock" -msgstr "โหมดเคลื่à¸à¸™à¸¢à¹‰à¸²à¸¢" +msgid "FileSystem Dock" +msgstr "ระบบไฟล์" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "FileSystem and Import Docks" -msgstr "ระบบไฟล์ à¹à¸¥à¸° นำเข้า" +msgid "Import Dock" +msgstr "นำเข้า" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1882,7 +1888,7 @@ msgstr "ไฟล์à¹à¸¥à¸°à¹‚ฟลเดà¸à¸£à¹Œ:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "ตัวà¸à¸¢à¹ˆà¸²à¸‡:" @@ -2734,22 +2740,28 @@ msgstr "ส่งà¸à¸à¸à¸žà¸£à¹‰à¸à¸¡à¸à¸²à¸£à¹à¸à¹‰à¹„ขจุดบภ#: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." -msgstr "เมื่à¸à¸ªà¹ˆà¸‡à¸à¸à¸ โปรà¹à¸à¸£à¸¡à¸ˆà¸°à¸žà¸¢à¸²à¸¢à¸²à¸¡à¹€à¸Šà¸·à¹ˆà¸à¸¡à¸•à¹ˆà¸à¸¡à¸²à¸¢à¸±à¸‡à¸„à¸à¸¡à¸žà¸´à¸§à¹€à¸•à¸à¸£à¹Œà¹€à¸„รื่à¸à¸‡à¸™à¸µà¹‰à¹€à¸žà¸·à¹ˆà¸à¸—ำà¸à¸²à¸£à¹à¸à¹‰à¹„ขจุดบà¸à¸žà¸£à¹ˆà¸à¸‡" +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." +msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "ส่งà¸à¸à¸à¹‚ดยใช้ระบบไฟล์เครืà¸à¸‚่าย" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "ถ้าเปิดตัวเลืà¸à¸à¸™à¸µà¹‰ ตัวเà¸à¸¡à¸—ี่ส่งà¸à¸à¸à¸ˆà¸°à¸¡à¸µà¸‚นาดà¹à¸„่พà¸à¹ƒà¸Šà¹‰à¸‡à¸²à¸™à¹„ด้\n" "ตัวเà¸à¸¡à¸ˆà¸°à¹„ด้รับระบบไฟล์จาà¸à¹‚ปรà¹à¸à¸£à¸¡à¹à¸à¹‰à¹„ขผ่านเครืà¸à¸‚่าย\n" @@ -2760,9 +2772,10 @@ msgid "Visible Collision Shapes" msgstr "ขà¸à¸šà¹€à¸‚ตà¸à¸²à¸£à¸Šà¸™à¸—ี่มà¸à¸‡à¹€à¸«à¹‡à¸™à¹„ด้" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "รูปทรงà¸à¸²à¸¢à¸ าพà¹à¸¥à¸°à¸£à¸±à¸‡à¸ªà¸µ (2D à¹à¸¥à¸° 3D) จะมà¸à¸‡à¹€à¸«à¹‡à¸™à¹„ด้ขณะเริ่มโปรà¹à¸à¸£à¸¡à¸–้าเปิดตัวเลืà¸à¸à¸™à¸µà¹‰" #: editor/editor_node.cpp @@ -2770,35 +2783,40 @@ msgid "Visible Navigation" msgstr "à¹à¸ªà¸”งà¸à¸²à¸£à¸™à¸³à¸—าง" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "รูปทรงที่มีเส้นนำทางจะมà¸à¸‡à¹€à¸«à¹‡à¸™à¹„ด้เมื่à¸à¹€à¸£à¸´à¹ˆà¸¡à¹‚ปรà¹à¸à¸£à¸¡à¸–้าเปิดตัวเลืà¸à¸à¸™à¸µà¹‰" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "ซิงค์à¸à¸²à¸£à¹€à¸›à¸¥à¸µà¹ˆà¸¢à¸™à¹à¸›à¸¥à¸‡à¸‰à¸²à¸" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "ถ้าเปิดตัวเลืà¸à¸à¸™à¸µà¹‰ โปรà¹à¸à¸£à¸¡à¸—ี่รันà¸à¸¢à¸¹à¹ˆà¸ˆà¸°à¹„ด้รับà¸à¸²à¸£à¹à¸à¹‰à¹„ขทันที\n" "เมื่à¸à¹ƒà¸Šà¹‰à¸à¸±à¸šà¸à¸¸à¸›à¸à¸£à¸“์à¹à¸šà¸šà¸£à¸µà¹‚มท จะดีà¸à¸§à¹ˆà¸²à¸–้าเปิดระบบไฟล์เครืà¸à¸‚่ายด้วย" #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "ซิงค์à¸à¸²à¸£à¹€à¸›à¸¥à¸µà¹ˆà¸¢à¸™à¹à¸›à¸¥à¸‡à¸ªà¸„ริปต์" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "เมื่à¸à¹€à¸›à¸´à¸”ตัวเลืà¸à¸à¸™à¸µà¹‰ สคริปต์ที่บันทึà¸à¸ˆà¸°à¹‚หลดในเà¸à¸¡à¸—ันที\n" "ถ้าใช้à¸à¸±à¸šà¸à¸¸à¸›à¸à¸£à¸“์รีโมท จะดีà¸à¸§à¹ˆà¸²à¸–้าเปิดระบบไฟล์เครืà¸à¸‚่ายด้วย" @@ -2860,7 +2878,7 @@ msgstr "ช่วยเหลืà¸" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "ค้นหา" @@ -3261,9 +3279,11 @@ msgid "Add Key/Value Pair" msgstr "เพิ่มคู่ขà¸à¸‡à¸„ีย์/ค่า" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "ไม่มีà¹à¸¡à¹ˆà¹à¸šà¸šà¸ªà¹ˆà¸‡à¸à¸à¸à¸—ี่สามารถรันเà¸à¸¡à¹„ด้ขà¸à¸‡à¹à¸žà¸¥à¸•à¸Ÿà¸à¸£à¹Œà¸¡à¸™à¸µà¹‰\n" "à¸à¸£à¸¸à¸“าเพิ่มà¹à¸¡à¹ˆà¹à¸šà¸šà¸ªà¹ˆà¸‡à¸à¸à¸à¹ƒà¸™à¹€à¸¡à¸™à¸¹à¸ªà¹ˆà¸‡à¸à¸à¸" @@ -5026,7 +5046,7 @@ msgid "Bake Lightmaps" msgstr "สร้าง Lightmaps" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "ตัวà¸à¸¢à¹ˆà¸²à¸‡" @@ -7765,7 +7785,8 @@ msgid "New Animation" msgstr "à¹à¸à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™à¹ƒà¸«à¸¡à¹ˆ" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "ความเร็ว (เฟรม/วินาที):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10301,11 +10322,18 @@ msgid "Batch Rename" msgstr "เปลี่ยนชื่à¸" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "à¹à¸—นที่: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "คำนำหน้า" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "คำต่à¸à¸—้าย" #: editor/rename_dialog.cpp @@ -10352,7 +10380,7 @@ msgid "Per-level Counter" msgstr "ตัวนับต่à¸à¹€à¸¥à¹€à¸§à¸¥" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10413,7 +10441,7 @@ msgstr "รีเซ็ตซูม" #: editor/rename_dialog.cpp #, fuzzy -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "à¹à¸à¹‰à¹„ขสมà¸à¸²à¸£" #: editor/rename_dialog.cpp @@ -12430,6 +12458,11 @@ msgstr "" "ไดรเวà¸à¸£à¹Œà¸§à¸µà¸”ีโภGLES2 ไม่สนับสนุน GIProbe\n" "ใช้ BakedLightmap à¹à¸—น" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12712,6 +12745,16 @@ msgstr "" msgid "Constants cannot be modified." msgstr "ค่าคงที่ไม่สามารถà¹à¸à¹‰à¹„ขได้" +#, fuzzy +#~ msgid "FileSystem and Import Docks" +#~ msgstr "ระบบไฟล์ à¹à¸¥à¸° นำเข้า" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "เมื่à¸à¸ªà¹ˆà¸‡à¸à¸à¸ โปรà¹à¸à¸£à¸¡à¸ˆà¸°à¸žà¸¢à¸²à¸¢à¸²à¸¡à¹€à¸Šà¸·à¹ˆà¸à¸¡à¸•à¹ˆà¸à¸¡à¸²à¸¢à¸±à¸‡à¸„à¸à¸¡à¸žà¸´à¸§à¹€à¸•à¸à¸£à¹Œà¹€à¸„รื่à¸à¸‡à¸™à¸µà¹‰à¹€à¸žà¸·à¹ˆà¸à¸—ำà¸à¸²à¸£à¹à¸à¹‰à¹„ขจุดบà¸à¸žà¸£à¹ˆà¸à¸‡" + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "ฉาà¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¸¢à¸±à¸‡à¹„ม่ได้บันทึภà¸à¸£à¸¸à¸“าบันทึà¸à¸à¹ˆà¸à¸™à¹€à¸£à¸´à¹ˆà¸¡à¹‚ปรà¹à¸à¸£à¸¡" diff --git a/editor/translations/tr.po b/editor/translations/tr.po index 1ac1204e09..c443d7bb94 100644 --- a/editor/translations/tr.po +++ b/editor/translations/tr.po @@ -51,12 +51,14 @@ # Ahmet Elgün <ahmetelgn@gmail.com>, 2020. # Efruz Yıldırır <efruzyildirir@gmail.com>, 2020. # Hazar <duurkak@yandex.com>, 2020. +# Mutlu ORAN <mutlu.oran66@gmail.com>, 2020. +# Yusuf Osman YILMAZ <wolfkan4219@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-08-20 15:20+0000\n" -"Last-Translator: Hazar <duurkak@yandex.com>\n" +"PO-Revision-Date: 2020-09-15 07:17+0000\n" +"Last-Translator: Yusuf Osman YILMAZ <wolfkan4219@gmail.com>\n" "Language-Team: Turkish <https://hosted.weblate.org/projects/godot-engine/" "godot/tr/>\n" "Language: tr\n" @@ -64,7 +66,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.2.1-dev\n" +"X-Generator: Weblate 4.3-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -574,6 +576,7 @@ msgid "Seconds" msgstr "Saniye" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -752,7 +755,7 @@ msgstr "Büyük/Küçük Harf EÅŸleÅŸtir" msgid "Whole Words" msgstr "Tam Kelimeler" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "DeÄŸiÅŸtir" @@ -944,6 +947,11 @@ msgid "Signals" msgstr "Sinyaller" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Döşemelerde Bul" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Bu sinyalden, tüm baÄŸlantıları kaldırmak istediÄŸinizden emin misiniz?" @@ -981,7 +989,7 @@ msgid "Recent:" msgstr "Yakın zamanda:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Ara:" @@ -1671,16 +1679,17 @@ msgid "Scene Tree Editing" msgstr "Sahne AÄŸacı Düzenleme" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Dock İçe Aktar" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Dock Nod" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "DosyaSistemi ve İçe Aktarım" +#, fuzzy +msgid "FileSystem Dock" +msgstr "DosyaSistemi" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Dock İçe Aktar" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1943,7 +1952,7 @@ msgstr "Dizinler & Dosyalar:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Önizleme:" @@ -1990,7 +1999,7 @@ msgstr "Åžundan miras alındı:" #: editor/editor_help.cpp msgid "Description" -msgstr "Tanım" +msgstr "Açıklama" #: editor/editor_help.cpp msgid "Online Tutorials" @@ -2010,7 +2019,7 @@ msgstr "varsayılan:" #: editor/editor_help.cpp msgid "Methods" -msgstr "Metotlar" +msgstr "Yöntemler" #: editor/editor_help.cpp msgid "Theme Properties" @@ -2041,8 +2050,9 @@ msgstr "" "bulunarak[/url][/color] yardım edebilirsiniz!" #: editor/editor_help.cpp +#, fuzzy msgid "Method Descriptions" -msgstr "Metot Açıklamaları" +msgstr "Yöntem Açıklamaları" #: editor/editor_help.cpp msgid "" @@ -2819,24 +2829,28 @@ msgstr "Uzaktan Hata Ayıklama ile Dağıt" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Verilen yürütülebilir dosya, dışa aktarılırken veya dağıtıldığında, hata " -"ayıklanacak ÅŸekilde bu bilgisayarın IP'sine baÄŸlanmaya çalışacaktır." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "AÄŸ DS ile Küçük Dağıtım" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Bu seçenek etkinleÅŸtirildiÄŸinde, dışa aktarma veya dağıtma çok küçük bir " "çalıştırılabilir dosya üretir.\n" @@ -2849,9 +2863,10 @@ msgid "Visible Collision Shapes" msgstr "Görünür Çarpışma Åžekilleri" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Bu seçenek açıksa, çalışan oyunda çarpışma ÅŸekilleri ve raycast düğümleri " "(2B ve 3B için) görünür olacaktır." @@ -2861,23 +2876,26 @@ msgid "Visible Navigation" msgstr "Görünür Yönlendirici" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Bu seçenek açıksa, çalışan oyunda yönlendirici örüntüleri ve çokgenler " "görünür olacaktır." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Sahne DeÄŸiÅŸikliklerini EÅŸ Zamanla" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Bu seçenek etkinleÅŸtirildiÄŸinde, düzenleyicide bulunan sahnedeki " "deÄŸiÅŸiklikler çalışmakta olan oyununda çoÄŸaltılır.\n" @@ -2885,15 +2903,17 @@ msgstr "" "verimli olur." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Betik DeÄŸiÅŸikliklerini EÅŸ Zamanla" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Bu seçenek etkinleÅŸtirildiÄŸinde, kaydedilen tüm betik çalışan oyunda yeniden " "yüklenecektir.\n" @@ -2957,7 +2977,7 @@ msgstr "Yardım" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Ara" @@ -3376,9 +3396,11 @@ msgid "Add Key/Value Pair" msgstr "Anahtar/DeÄŸer Ä°kilisini Ekle" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Çalıştırılabilir dışa aktarma önayarı bu platform için bulunamadı.\n" "Lütfen dışa aktar menüsünden çalıştırılabilir bir önayar ekleyin." @@ -5147,7 +5169,7 @@ msgid "Bake Lightmaps" msgstr "Işık-Haritalarını PiÅŸir" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Önizleme" @@ -7789,7 +7811,8 @@ msgid "New Animation" msgstr "Yeni Animasyon" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "Hız (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10352,11 +10375,18 @@ msgid "Batch Rename" msgstr "Tümden Yeniden Adlandır" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "DeÄŸiÅŸtir: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "Ön Ek" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "Son Ek" #: editor/rename_dialog.cpp @@ -10404,7 +10434,8 @@ msgid "Per-level Counter" msgstr "Seviye Başına Sayaç" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "Ayarlanmışsa, sayaç her bir alt düğüm grubu için yeniden baÅŸlar" #: editor/rename_dialog.cpp @@ -10464,7 +10495,8 @@ msgid "Reset" msgstr "Sıfırla" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "Düzenli Ä°fade Hatası" #: editor/rename_dialog.cpp @@ -12528,6 +12560,11 @@ msgstr "" "GIProbes GLES2 video sürücüsü tarafından desteklenmez.\n" "Bunun yerine bir BakedLightmap kullanın." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "90 dereceden geniÅŸ açılı SpotIşık gölge oluÅŸturamaz." @@ -12835,6 +12872,16 @@ msgstr "varyings yalnızca vertex iÅŸlevinde atanabilir." msgid "Constants cannot be modified." msgstr "Sabit deÄŸerler deÄŸiÅŸtirilemez." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "DosyaSistemi ve İçe Aktarım" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Verilen yürütülebilir dosya, dışa aktarılırken veya dağıtıldığında, hata " +#~ "ayıklanacak ÅŸekilde bu bilgisayarın IP'sine baÄŸlanmaya çalışacaktır." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "Åžimdiki sahne hiç kaydedilmedi, lütfen çalıştırmadan önce kaydediniz." diff --git a/editor/translations/uk.po b/editor/translations/uk.po index 672785a2aa..417c5aeeeb 100644 --- a/editor/translations/uk.po +++ b/editor/translations/uk.po @@ -546,6 +546,7 @@ msgid "Seconds" msgstr "Секунди" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "Кадри за Ñекунду" @@ -724,7 +725,7 @@ msgstr "Враховувати регіÑÑ‚Ñ€" msgid "Whole Words" msgstr "Цілі Ñлова" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Замінити" @@ -917,6 +918,11 @@ msgid "Signals" msgstr "Сигнали" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Фільтрувати плитки" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Ви Ñправді хочете вилучити уÑÑ– з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· цього Ñигналу?" @@ -954,7 +960,7 @@ msgid "Recent:" msgstr "Ðещодавні:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Пошук:" @@ -1644,16 +1650,17 @@ msgid "Scene Tree Editing" msgstr "Ð ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ñ–Ñ”Ñ€Ð°Ñ€Ñ…Ñ–Ñ— Ñцени" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Бічна панель імпортуваннÑ" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Бічна панель вузлів" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "Бічна панель файлової ÑиÑтеми та імпортуваннÑ" +#, fuzzy +msgid "FileSystem Dock" +msgstr "Файлова ÑиÑтема" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Бічна панель імпортуваннÑ" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1917,7 +1924,7 @@ msgstr "Каталоги та файли:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Попередній переглÑд:" @@ -2798,24 +2805,28 @@ msgstr "Ð Ð¾Ð·Ð³Ð¾Ñ€Ñ‚Ð°Ð½Ð½Ñ Ð·Ð° допомогою віддаленого н #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"При екÑпорті або розгортанні, отриманий виконуваний файл буде намагатиÑÑ " -"підключитиÑÑ Ð´Ð¾ IP цього комп'ютера, Ð´Ð»Ñ Ð½Ð°Ð»Ð°Ð³Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "Маленьке Ñ€Ð¾Ð·Ð³Ð¾Ñ€Ñ‚Ð°Ð½Ð½Ñ Ð· Network File System" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Якщо цей параметр увімкнено, екÑпорт або Ñ€Ð¾Ð·Ð³Ð¾Ñ€Ñ‚Ð°Ð½Ð½Ñ Ð´Ð°ÑŽÑ‚ÑŒ мінімальний " "виконуваний файл.\n" @@ -2828,9 +2839,10 @@ msgid "Visible Collision Shapes" msgstr "Видимі контури зіткнень" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" "Контури Ð·Ñ–Ñ‚ÐºÐ½ÐµÐ½Ð½Ñ Ñ‚Ð° вузли raycast (Ð´Ð»Ñ 2D та 3D) буде видно в роботі гри, " "Ñкщо Ñ†Ñ Ð¾Ð¿Ñ†Ñ–Ñ ÑƒÐ²Ñ–Ð¼ÐºÐ½ÐµÐ½Ð°." @@ -2840,23 +2852,26 @@ msgid "Visible Navigation" msgstr "Видимі навігації" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" "Ðавігаційні поліÑітки та полігони будуть видимі у запущеній грі, Ñкщо Ñ†Ñ " "Ð¾Ð¿Ñ†Ñ–Ñ ÑƒÐ²Ñ–Ð¼ÐºÐ½ÐµÐ½Ð°." #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "Синхронізувати зміни Ñцени" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Якщо цей параметр увімкнено, будь-Ñкі зміни, внеÑені в Ñцену в редакторі, " "будуть відтворені в роботі гри.\n" @@ -2864,15 +2879,17 @@ msgstr "" "файловою ÑиÑтемою." #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "Синхронізувати зміни в Ñкрипті" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "Якщо цей параметр увімкнено, будь-Ñкий Ñкрипт, Ñкий буде збережений, буде " "перезавантажений у поточній грі.\n" @@ -2936,7 +2953,7 @@ msgstr "Довідка" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Пошук" @@ -3355,9 +3372,11 @@ msgid "Add Key/Value Pair" msgstr "Додати пару ключ-значеннÑ" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "Ðе знайдено робочий екÑпортер Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— платформи.\n" "Будь лаÑка, додайте його в меню екÑпорту." @@ -5129,7 +5148,7 @@ msgid "Bake Lightmaps" msgstr "Запікати карти оÑвітленнÑ" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Попередній переглÑд" @@ -7781,7 +7800,8 @@ msgid "New Animation" msgstr "Ðова анімаціÑ" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "ЧаÑтота (кадри за Ñек.):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10353,11 +10373,18 @@ msgid "Batch Rename" msgstr "Пакетне перейменуваннÑ" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Замінити: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "ПрефікÑ" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "СуфікÑ" #: editor/rename_dialog.cpp @@ -10405,7 +10432,8 @@ msgid "Per-level Counter" msgstr "Лічильник на рівень" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "" "Якщо позначено, лічильник перезапуÑкатиметьÑÑ Ð´Ð»Ñ ÐºÐ¾Ð¶Ð½Ð¾Ñ— групи дочірніх " "вузлів" @@ -10467,7 +10495,8 @@ msgid "Reset" msgstr "Скинути" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "Помилка у формальному виразі" #: editor/rename_dialog.cpp @@ -12566,6 +12595,11 @@ msgstr "" "У драйвері GLES2 не передбачено підтримки GIProbes.\n" "СкориÑтайтеÑÑ Ð·Ð°Ð¼Ñ–ÑÑ‚ÑŒ них BakedLightmap." +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "SpotLight з кутом, Ñкий Ñ” більшим за 90 градуÑів, не може давати тіні." @@ -12875,6 +12909,16 @@ msgstr "Змінні величини можна пов'Ñзувати лише msgid "Constants cannot be modified." msgstr "Сталі не можна змінювати." +#~ msgid "FileSystem and Import Docks" +#~ msgstr "Бічна панель файлової ÑиÑтеми та імпортуваннÑ" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "При екÑпорті або розгортанні, отриманий виконуваний файл буде намагатиÑÑ " +#~ "підключитиÑÑ Ð´Ð¾ IP цього комп'ютера, Ð´Ð»Ñ Ð½Ð°Ð»Ð°Ð³Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "" #~ "Поточна Ñцена ніколи не була збережена, будь лаÑка, збережіть Ñ—Ñ— до " diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po index 89208b4070..2859b66ac9 100644 --- a/editor/translations/ur_PK.po +++ b/editor/translations/ur_PK.po @@ -516,6 +516,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -696,7 +697,7 @@ msgstr "" msgid "Whole Words" msgstr "" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "" @@ -892,6 +893,11 @@ msgid "Signals" msgstr "" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "سب سکریپشن بنائیں" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -930,7 +936,7 @@ msgid "Recent:" msgstr "" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "" @@ -1605,16 +1611,16 @@ msgid "Scene Tree Editing" msgstr "" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "" - -#: editor/editor_feature_profile.cpp #, fuzzy msgid "Node Dock" msgstr "ایکشن منتقل کریں" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" +msgid "FileSystem Dock" +msgstr "" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" msgstr "" #: editor/editor_feature_profile.cpp @@ -1889,7 +1895,7 @@ msgstr "" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "" @@ -2728,22 +2734,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2752,8 +2762,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2762,32 +2772,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2848,7 +2858,7 @@ msgstr "" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "" @@ -3255,7 +3265,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -5021,7 +5032,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -7673,7 +7684,7 @@ msgid "New Animation" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10151,11 +10162,15 @@ msgid "Batch Rename" msgstr "" #: editor/rename_dialog.cpp -msgid "Prefix" +msgid "Replace:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Prefix:" +msgstr "" + +#: editor/rename_dialog.cpp +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10201,7 +10216,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10259,7 +10274,7 @@ msgid "Reset" msgstr "" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -12242,6 +12257,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" diff --git a/editor/translations/vi.po b/editor/translations/vi.po index 579b8550ee..2b56df15ed 100644 --- a/editor/translations/vi.po +++ b/editor/translations/vi.po @@ -534,6 +534,7 @@ msgid "Seconds" msgstr "Giây" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -717,7 +718,7 @@ msgstr "Khá»›p TrÆ°á»ng Hợp" msgid "Whole Words" msgstr "Cả từ" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "Thay thế" @@ -911,6 +912,11 @@ msgid "Signals" msgstr "TÃn hiệu (Signal)" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "Lá»c tệp tin ..." + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "Bạn có chắc muốn xóa bá» tất cả kết nối từ tÃn hiệu nà y?" @@ -948,7 +954,7 @@ msgid "Recent:" msgstr "Gần đây:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "Tìm kiếm:" @@ -1643,19 +1649,19 @@ msgid "Scene Tree Editing" msgstr "Chỉnh sá»a cảnh" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "Nháºp và o" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "Nút" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "FileSystem and Import Docks" +msgid "FileSystem Dock" msgstr "Hệ thống táºp tin" #: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "Nháºp và o" + +#: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" msgstr "Xoá hồ sÆ¡ '%s'? (không hoà n tác)" @@ -1923,7 +1929,7 @@ msgstr "Các ThÆ° mục và Tệp tin:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "Xem thá»:" @@ -2799,24 +2805,27 @@ msgstr "Triển khai gỡ lá»—i từ xa" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"Khi xuất ra hoặc triển khai, kết quả thá»±c thi sẽ kết nối đến IP máy tÃnh nà y " -"để được gỡ lá»—i." #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "Khi tuỳ chá»n nà y được báºt, lúc xuất hoặc triển khai sẽ tạo má»™t tệp thá»±c thi " "tối giản nhất.\n" @@ -2830,8 +2839,8 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2840,32 +2849,32 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +msgid "Synchronize Script Changes" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -2929,7 +2938,7 @@ msgstr "Trợ giúp" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "Tìm kiếm" @@ -3347,7 +3356,8 @@ msgstr "Thêm cặp Khoá/Giá trị" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -5125,7 +5135,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "Xem thá»" @@ -7798,7 +7808,7 @@ msgid "New Animation" msgstr "Tạo Animation má»›i" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10338,11 +10348,16 @@ msgid "Batch Rename" msgstr "Äổi tên" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "Thay thế: " + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10389,7 +10404,8 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "Nếu đặt bá»™ đếm khởi Ä‘á»™ng lại cho từng nhóm nút con" #: editor/rename_dialog.cpp @@ -10449,8 +10465,9 @@ msgid "Reset" msgstr "Äặt lại phóng" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" -msgstr "" +#, fuzzy +msgid "Regular Expression Error:" +msgstr "Phiên bản hiện tại:" #: editor/rename_dialog.cpp #, fuzzy @@ -12468,6 +12485,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -12728,6 +12750,13 @@ msgstr "" msgid "Constants cannot be modified." msgstr "Không thể chỉnh sá»a hằng số." +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "Khi xuất ra hoặc triển khai, kết quả thá»±c thi sẽ kết nối đến IP máy tÃnh " +#~ "nà y để được gỡ lá»—i." + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "Cảnh hiện tại chÆ°a được lÆ°u, hãy lÆ°u nó trÆ°á»›c khi chạy." diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po index fede4b0528..1fd689420b 100644 --- a/editor/translations/zh_CN.po +++ b/editor/translations/zh_CN.po @@ -75,7 +75,7 @@ msgid "" msgstr "" "Project-Id-Version: Chinese (Simplified) (Godot Engine)\n" "POT-Creation-Date: 2018-01-20 12:15+0200\n" -"PO-Revision-Date: 2020-09-05 09:37+0000\n" +"PO-Revision-Date: 2020-09-24 12:43+0000\n" "Last-Translator: Haoyu Qiu <timothyqiu32@gmail.com>\n" "Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/" "godot-engine/godot/zh_Hans/>\n" @@ -585,6 +585,7 @@ msgid "Seconds" msgstr "秒" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -763,7 +764,7 @@ msgstr "大å°å†™åŒ¹é…" msgid "Whole Words" msgstr "å…¨å—匹é…" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "替æ¢" @@ -952,6 +953,11 @@ msgid "Signals" msgstr "ä¿¡å·" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "ç›é€‰å›¾å—" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "ä½ ç¡®å®šè¦ä»Žè¯¥å¹¿æ’ä¿¡å·ä¸ç§»é™¤æ‰€æœ‰è¿žæŽ¥å—?" @@ -989,7 +995,7 @@ msgid "Recent:" msgstr "最近使用:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "æœç´¢:" @@ -1668,16 +1674,17 @@ msgid "Scene Tree Editing" msgstr "åœºæ™¯æ ‘ç¼–è¾‘" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "导入é¢æ¿" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "节点é¢æ¿" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "文件系统和导入é¢æ¿" +#, fuzzy +msgid "FileSystem Dock" +msgstr "文件系统" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "导入é¢æ¿" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1939,7 +1946,7 @@ msgstr "目录与文件:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "预览:" @@ -2791,23 +2798,28 @@ msgstr "使用远程调试部署" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"导出或å‘布项目时,为了能够调试项目,å¯æ‰§è¡Œæ–‡ä»¶å°†è¯•å›¾é€šè¿‡æœ¬æœºIP连接到调试器。" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "使用网络文件系统进行å°åž‹éƒ¨ç½²" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "当å¯ç”¨æ¤é¡¹åŽï¼Œå°†åœ¨å¯¼å‡ºæˆ–å‘布项目时生æˆæœ€å°åŒ–å¯è‡ªè¡Œæ–‡ä»¶ã€‚\n" "文件系统将通过网络连接到编辑器æ¥å®žçŽ°ã€‚\n" @@ -2818,9 +2830,10 @@ msgid "Visible Collision Shapes" msgstr "显示碰撞区域" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "如果å¯ç”¨æ¤é¡¹ï¼ŒèŠ‚点的碰撞区域和raycast将在游æˆè¿è¡Œæ—¶å¯è§ã€‚" #: editor/editor_node.cpp @@ -2828,35 +2841,40 @@ msgid "Visible Navigation" msgstr "显示导航" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "如果å¯ç”¨æ¤é¡¹ï¼Œç”¨äºŽå¯¼èˆªçš„mesh和多边形将在游æˆè¿è¡Œæ—¶å¯è§ã€‚" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "åŒæ¥åœºæ™¯ä¿®æ”¹" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "å¼€å¯æ¤é¡¹åŽï¼Œåœ¨ç¼–辑器ä¸å¯¹åœºæ™¯çš„所有修改都会被应用与æ£åœ¨è¿è¡Œçš„游æˆä¸ã€‚\n" "当使用远程设备调试时,使用网络文件系统能有效æ高编辑效率。" #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "åŒæ¥è„šæœ¬å˜æ›´" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "å¼€å¯æ¤é¡¹åŽï¼Œæ‰€æœ‰è„šæœ¬åœ¨ä¿å˜æ—¶éƒ½ä¼šè¢«æ£åœ¨è¿è¡Œçš„游æˆé‡æ–°åŠ 载。\n" "当使用远程设备调试时,使用网络文件系统能有效æ高编辑效率。" @@ -2918,7 +2936,7 @@ msgstr "帮助" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "æœç´¢" @@ -3128,7 +3146,7 @@ msgstr "找ä¸åˆ°å资æºã€‚" #: editor/editor_plugin.cpp msgid "Creating Mesh Previews" -msgstr "åˆ›å»ºç½‘æ ¼é¢„è§ˆ" +msgstr "æ£åœ¨åˆ›å»ºç½‘æ ¼é¢„è§ˆ" #: editor/editor_plugin.cpp msgid "Thumbnail..." @@ -3327,9 +3345,11 @@ msgid "Add Key/Value Pair" msgstr "æ·»åŠ é”®/值对" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "没有对应该平å°çš„å¯æ‰§è¡Œå¯¼å‡ºé¢„设。\n" "请在导出èœå•ä¸æ·»åŠ å¯æ‰§è¡Œé¢„设。" @@ -5070,7 +5090,7 @@ msgid "Bake Lightmaps" msgstr "烘焙光照贴图" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "预览" @@ -5331,7 +5351,7 @@ msgstr "é‡ç½®ç¼©æ”¾" #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp msgid "Select Mode" -msgstr "é¼ æ ‡æ¨¡å¼" +msgstr "选择模å¼" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Drag: Rotate" @@ -7691,7 +7711,8 @@ msgid "New Animation" msgstr "新建动画" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "速度(FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -9422,7 +9443,7 @@ msgstr "自定义 (以逗å·åˆ†éš”):" #: editor/project_export.cpp msgid "Feature List:" -msgstr "功能列表:" +msgstr "特性列表:" #: editor/project_export.cpp msgid "Script" @@ -10196,11 +10217,18 @@ msgid "Batch Rename" msgstr "批é‡é‡å‘½å" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "替æ¢ï¼š " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "å‰ç¼€" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "åŽç¼€" #: editor/rename_dialog.cpp @@ -10248,7 +10276,8 @@ msgid "Per-level Counter" msgstr "å„级å•ç‹¬è®¡æ•°" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "如果å¯ç”¨ï¼Œè®¡æ•°å™¨å°†ä¸ºæ¯ç»„å节点é‡ç½®" #: editor/rename_dialog.cpp @@ -10308,7 +10337,8 @@ msgid "Reset" msgstr "é‡ç½®" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "æ£åˆ™è¡¨è¾¾å¼å‡ºé”™" #: editor/rename_dialog.cpp @@ -10801,7 +10831,7 @@ msgstr "内置脚本(到场景文件ä¸ï¼‰ã€‚" #: editor/script_create_dialog.cpp msgid "Will create a new script file." -msgstr "将创建一个新的脚本文件。" +msgstr "将创建新脚本文件。" #: editor/script_create_dialog.cpp msgid "Will load an existing script file." @@ -10851,7 +10881,7 @@ msgstr "错误:" #: editor/script_editor_debugger.cpp msgid "C++ Error" -msgstr "C ++错误" +msgstr "C++错误" #: editor/script_editor_debugger.cpp msgid "C++ Error:" @@ -10859,7 +10889,7 @@ msgstr "C++错误:" #: editor/script_editor_debugger.cpp msgid "C++ Source" -msgstr "C++æºç¨‹åº" +msgstr "C++æºæ–‡ä»¶" #: editor/script_editor_debugger.cpp msgid "Source:" @@ -10867,7 +10897,7 @@ msgstr "æºæ–‡ä»¶:" #: editor/script_editor_debugger.cpp msgid "C++ Source:" -msgstr "C++æºç¨‹åºï¼š" +msgstr "C++æºæ–‡ä»¶ï¼š" #: editor/script_editor_debugger.cpp msgid "Stack Trace" @@ -10895,11 +10925,11 @@ msgstr "跳过æ–点" #: editor/script_editor_debugger.cpp msgid "Inspect Previous Instance" -msgstr "编辑上一个实例" +msgstr "查看上一个实例" #: editor/script_editor_debugger.cpp msgid "Inspect Next Instance" -msgstr "编辑下一个实例" +msgstr "查看下一个实例" #: editor/script_editor_debugger.cpp msgid "Stack Frames" @@ -10935,7 +10965,7 @@ msgstr "å 用显å˜çš„资æºåˆ—表:" #: editor/script_editor_debugger.cpp msgid "Total:" -msgstr "åˆè®¡:" +msgstr "åˆè®¡ï¼š" #: editor/script_editor_debugger.cpp msgid "Export list to a CSV file" @@ -10983,15 +11013,15 @@ msgstr "导出为CSVæ ¼å¼" #: editor/settings_config_dialog.cpp msgid "Erase Shortcut" -msgstr "清除快æ·æ–¹å¼" +msgstr "清除快æ·é”®" #: editor/settings_config_dialog.cpp msgid "Restore Shortcut" -msgstr "æ¢å¤å¿«æ·æ–¹å¼" +msgstr "æ¢å¤å¿«æ·é”®" #: editor/settings_config_dialog.cpp msgid "Change Shortcut" -msgstr "更改快æ·æ–¹å¼" +msgstr "更改快æ·é”®" #: editor/settings_config_dialog.cpp msgid "Editor Settings" @@ -11115,7 +11145,7 @@ msgstr "动æ€é“¾æŽ¥åº“" #: modules/gdnative/gdnative_library_singleton_editor.cpp msgid "Enabled GDNative Singleton" -msgstr "å¯ç”¨gdnative singleton" +msgstr "å¯ç”¨çš„ GDNative å•ä¾‹" #: modules/gdnative/gdnative_library_singleton_editor.cpp msgid "Disabled GDNative Singleton" @@ -11223,11 +11253,11 @@ msgstr "ç¦ç”¨è£å‰ª" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Clip Above" -msgstr "è£å‰ªä¸Šçº§" +msgstr "å‘上è£å‰ª" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Clip Below" -msgstr "è£å‰ªä¸‹çº§" +msgstr "å‘下è£å‰ª" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Edit X Axis" @@ -11315,7 +11345,7 @@ msgstr "æ¸…é™¤å¯¼èˆªç½‘æ ¼(mesh)。" #: modules/recast/navigation_mesh_generator.cpp msgid "Setting up Configuration..." -msgstr "æ£åœ¨è®¾ç½®é…ç½®..。" +msgstr "æ£åœ¨è®¾ç½®é…ç½®..." #: modules/recast/navigation_mesh_generator.cpp msgid "Calculating grid size..." @@ -12300,6 +12330,11 @@ msgstr "" "GLES2视频驱动程åºä¸æ”¯æŒGIProbe。\n" "请改用BakedLightmap。" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "角度宽于 90 度的 SpotLight æ— æ³•æŠ•å°„å‡ºé˜´å½±ã€‚" @@ -12583,6 +12618,16 @@ msgstr "å˜é‡åªèƒ½åœ¨é¡¶ç‚¹å‡½æ•°ä¸æŒ‡å®šã€‚" msgid "Constants cannot be modified." msgstr "ä¸å…许修改常é‡ã€‚" +#~ msgid "FileSystem and Import Docks" +#~ msgstr "文件系统和导入é¢æ¿" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "导出或å‘布项目时,为了能够调试项目,å¯æ‰§è¡Œæ–‡ä»¶å°†è¯•å›¾é€šè¿‡æœ¬æœºIP连接到调试" +#~ "器。" + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "当å‰åœºæ™¯å°šæœªä¿å˜ï¼Œè¯·ä¿å˜åŽå†å°è¯•æ‰§è¡Œã€‚" diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po index 7c7571fff0..5ccf540635 100644 --- a/editor/translations/zh_HK.po +++ b/editor/translations/zh_HK.po @@ -549,6 +549,7 @@ msgid "Seconds" msgstr "" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "" @@ -742,7 +743,7 @@ msgstr "符åˆå¤§å°å¯«" msgid "Whole Words" msgstr "完整詞語" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp #, fuzzy msgid "Replace" msgstr "å–代" @@ -938,6 +939,11 @@ msgid "Signals" msgstr "訊號" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "篩é¸æª”案..." + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "" @@ -980,7 +986,7 @@ msgid "Recent:" msgstr "最近:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "æœå°‹ï¼š" @@ -1686,21 +1692,21 @@ msgstr "å³æ™‚編輯" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "Import Dock" -msgstr "å°Žå…¥" - -#: editor/editor_feature_profile.cpp -#, fuzzy msgid "Node Dock" msgstr "移動模å¼" #: editor/editor_feature_profile.cpp #, fuzzy -msgid "FileSystem and Import Docks" +msgid "FileSystem Dock" msgstr "檔案系統" #: editor/editor_feature_profile.cpp #, fuzzy +msgid "Import Dock" +msgstr "å°Žå…¥" + +#: editor/editor_feature_profile.cpp +#, fuzzy msgid "Erase profile '%s'? (no undo)" msgstr "全部å–代" @@ -1985,7 +1991,7 @@ msgstr "資料夾和檔案:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "é 覽:" @@ -2874,22 +2880,26 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +msgid "Small Deploy with Network Filesystem" msgstr "" #: editor/editor_node.cpp msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" #: editor/editor_node.cpp @@ -2899,8 +2909,8 @@ msgstr "å¯è¦‹ç¢°æ’žåœ–å½¢" #: editor/editor_node.cpp msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "" #: editor/editor_node.cpp @@ -2909,33 +2919,34 @@ msgstr "" #: editor/editor_node.cpp msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "" #: editor/editor_node.cpp #, fuzzy -msgid "Sync Scene Changes" +msgid "Synchronize Scene Changes" msgstr "åŒæ¥å ´æ™¯çš„變動" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "åŒæ¥æ›´æ–°è…³æœ¬" #: editor/editor_node.cpp msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" #: editor/editor_node.cpp editor/script_create_dialog.cpp @@ -3003,7 +3014,7 @@ msgstr "幫助" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "æœå°‹" @@ -3428,7 +3439,8 @@ msgstr "" #: editor/editor_run_native.cpp msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" #: editor/editor_run_script.cpp @@ -5305,7 +5317,7 @@ msgid "Bake Lightmaps" msgstr "" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "" @@ -8038,7 +8050,7 @@ msgid "New Animation" msgstr "æ–°çš„å‹•ç•«å稱:" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +msgid "Speed:" msgstr "" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10597,11 +10609,16 @@ msgid "Batch Rename" msgstr "é‡æ–°å‘½å..." #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "å–代: " + +#: editor/rename_dialog.cpp +msgid "Prefix:" msgstr "" #: editor/rename_dialog.cpp -msgid "Suffix" +msgid "Suffix:" msgstr "" #: editor/rename_dialog.cpp @@ -10651,7 +10668,7 @@ msgid "Per-level Counter" msgstr "" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +msgid "If set, the counter restarts for each group of child nodes." msgstr "" #: editor/rename_dialog.cpp @@ -10712,7 +10729,7 @@ msgid "Reset" msgstr "é‡è¨ç¸®æ”¾æ¯”例" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +msgid "Regular Expression Error:" msgstr "" #: editor/rename_dialog.cpp @@ -12766,6 +12783,11 @@ msgid "" "Use a BakedLightmap instead." msgstr "" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "" @@ -13024,6 +13046,10 @@ msgid "Constants cannot be modified." msgstr "" #, fuzzy +#~ msgid "FileSystem and Import Docks" +#~ msgstr "檔案系統" + +#, fuzzy #~ msgid "Not in resource path." #~ msgstr "ä¸åœ¨è³‡æºè·¯å¾‘。" diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po index 9063126888..4c693ce275 100644 --- a/editor/translations/zh_TW.po +++ b/editor/translations/zh_TW.po @@ -540,6 +540,7 @@ msgid "Seconds" msgstr "秒" #: editor/animation_track_editor.cpp +#: editor/plugins/sprite_frames_editor_plugin.cpp msgid "FPS" msgstr "FPS" @@ -718,7 +719,7 @@ msgstr "å€åˆ†å¤§å°å¯«" msgid "Whole Words" msgstr "æœå°‹å®Œæ•´å–®è©ž" -#: editor/code_editor.cpp editor/rename_dialog.cpp +#: editor/code_editor.cpp msgid "Replace" msgstr "å–代" @@ -907,6 +908,11 @@ msgid "Signals" msgstr "訊號" #: editor/connections_dialog.cpp +#, fuzzy +msgid "Filter signals" +msgstr "篩é¸åœ–å¡Š" + +#: editor/connections_dialog.cpp msgid "Are you sure you want to remove all connections from this signal?" msgstr "確定è¦åˆªé™¤æ‰€æœ‰ä¾†è‡ªæ¤è¨Šè™Ÿçš„連接嗎?" @@ -944,7 +950,7 @@ msgid "Recent:" msgstr "最近å˜å–:" #: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp -#: editor/property_selector.cpp editor/quick_open.cpp +#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp #: modules/visual_script/visual_script_property_selector.cpp msgid "Search:" msgstr "æœå°‹ï¼š" @@ -1627,16 +1633,17 @@ msgid "Scene Tree Editing" msgstr "æ£åœ¨ç·¨è¼¯å ´æ™¯æ¨¹" #: editor/editor_feature_profile.cpp -msgid "Import Dock" -msgstr "匯入 Dock" - -#: editor/editor_feature_profile.cpp msgid "Node Dock" msgstr "節點 Dock" #: editor/editor_feature_profile.cpp -msgid "FileSystem and Import Docks" -msgstr "檔案系統與匯入 Dock" +#, fuzzy +msgid "FileSystem Dock" +msgstr "檔案系統" + +#: editor/editor_feature_profile.cpp +msgid "Import Dock" +msgstr "匯入 Dock" #: editor/editor_feature_profile.cpp msgid "Erase profile '%s'? (no undo)" @@ -1898,7 +1905,7 @@ msgstr "資料夾與檔案:" #: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp #: editor/plugins/style_box_editor_plugin.cpp -#: editor/plugins/theme_editor_plugin.cpp +#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp msgid "Preview:" msgstr "é 覽:" @@ -2748,23 +2755,28 @@ msgstr "部署並啟用é 端åµéŒ¯" #: editor/editor_node.cpp msgid "" -"When exporting or deploying, the resulting executable will attempt to " -"connect to the IP of this computer in order to be debugged." +"When this option is enabled, using one-click deploy will make the executable " +"attempt to connect to this computer's IP so the running project can be " +"debugged.\n" +"This option is intended to be used for remote debugging (typically with a " +"mobile device).\n" +"You don't need to enable it to use the GDScript debugger locally." msgstr "" -"匯出或部署時,輸出的å¯åŸ·è¡Œæª”將會嘗試連接到這å°é›»è…¦çš„ IP ä½ç½®ä»¥é€²è¡Œé™¤éŒ¯ã€‚" #: editor/editor_node.cpp -msgid "Small Deploy with Network FS" +#, fuzzy +msgid "Small Deploy with Network Filesystem" msgstr "使用網路檔案系統進行å°åž‹éƒ¨ç½²" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is enabled, export or deploy will produce a minimal " -"executable.\n" +"When this option is enabled, using one-click deploy for Android will only " +"export an executable without the project data.\n" "The filesystem will be provided from the project by the editor over the " "network.\n" -"On Android, deploy will use the USB cable for faster performance. This " -"option speeds up testing for games with a large footprint." +"On Android, deploying will use the USB cable for faster performance. This " +"option speeds up testing for projects with large assets." msgstr "" "啟用該é¸é …後,匯出或部署是會產生最å°å¯åŸ·è¡Œæª”。\n" "專案之檔案系統將由本編輯器以網路æ供。\n" @@ -2776,9 +2788,10 @@ msgid "Visible Collision Shapes" msgstr "顯示碰撞å€åŸŸ" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " -"running game if this option is turned on." +"When this option is enabled, collision shapes and raycast nodes (for 2D and " +"3D) will be visible in the running project." msgstr "é–‹å•Ÿé¸é …後,執行éŠæˆ²æ™‚å°‡å¯çœ‹è¦‹ç¢°æ’žå€åŸŸèˆ‡ï¼ˆ2D 或 3D 的)射線節點。" #: editor/editor_node.cpp @@ -2786,35 +2799,40 @@ msgid "Visible Navigation" msgstr "顯示導航" #: editor/editor_node.cpp +#, fuzzy msgid "" -"Navigation meshes and polygons will be visible on the running game if this " -"option is turned on." +"When this option is enabled, navigation meshes and polygons will be visible " +"in the running project." msgstr "開啟該é¸é …後,執行éŠæˆ²æ™‚å°‡å¯çœ‹è¦‹å°Žèˆªç¶²æ ¼ (mesh) 與多邊形。" #: editor/editor_node.cpp -msgid "Sync Scene Changes" +#, fuzzy +msgid "Synchronize Scene Changes" msgstr "åŒæ¥å ´æ™¯æ”¹å‹•" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any changes made to the scene in the editor " -"will be replicated in the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any changes made to the scene in the editor " +"will be replicated in the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "開啟該é¸é …後,編輯器ä¸å°è©²å ´æ™¯çš„所有改動都將被套用至執行ä¸çš„éŠæˆ²ã€‚\n" "若在é 端è£ç½®ä¸Šä½¿ç”¨ï¼Œå¯ä½¿ç”¨ç¶²è·¯æª”案系統 NFS 以ç²å¾—最佳效能。" #: editor/editor_node.cpp -msgid "Sync Script Changes" +#, fuzzy +msgid "Synchronize Script Changes" msgstr "åŒæ¥è…³æœ¬æ”¹å‹•" #: editor/editor_node.cpp +#, fuzzy msgid "" -"When this option is turned on, any script that is saved will be reloaded on " -"the running game.\n" -"When used remotely on a device, this is more efficient with network " -"filesystem." +"When this option is enabled, any script that is saved will be reloaded in " +"the running project.\n" +"When used remotely on a device, this is more efficient when the network " +"filesystem option is enabled." msgstr "" "開啟該é¸é …後,ä¿å˜ä¹‹è…³æœ¬éƒ½å°‡æ–¼åŸ·è¡Œä¸çš„éŠæˆ²é‡æ–°è¼‰å…¥ã€‚\n" "若在é 端è£ç½®ä¸Šä½¿ç”¨ï¼Œå¯ä½¿ç”¨ç¶²è·¯æª”案系統 NFS 以ç²å¾—最佳效能。" @@ -2876,7 +2894,7 @@ msgstr "說明" #: editor/plugins/script_text_editor.cpp #: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp #: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp -#: editor/project_settings_editor.cpp editor/rename_dialog.cpp +#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Search" msgstr "æœå°‹" @@ -3286,9 +3304,11 @@ msgid "Add Key/Value Pair" msgstr "新增索引éµï¼å€¼çµ„" #: editor/editor_run_native.cpp +#, fuzzy msgid "" "No runnable export preset found for this platform.\n" -"Please add a runnable preset in the export menu." +"Please add a runnable preset in the Export menu or define an existing preset " +"as runnable." msgstr "" "該平å°æ²’有å¯åŸ·è¡Œçš„匯出é è¨è¨å®šã€‚\n" "請在匯出é¸å–®ä¸æ–°å¢žä¸€å€‹å¯åŸ·è¡Œçš„é è¨è¨å®šã€‚" @@ -5030,7 +5050,7 @@ msgid "Bake Lightmaps" msgstr "建立光照圖" #: editor/plugins/camera_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/rename_dialog.cpp +#: editor/plugins/spatial_editor_plugin.cpp msgid "Preview" msgstr "é 覽" @@ -7651,7 +7671,8 @@ msgid "New Animation" msgstr "新增動畫" #: editor/plugins/sprite_frames_editor_plugin.cpp -msgid "Speed (FPS):" +#, fuzzy +msgid "Speed:" msgstr "速度 (FPS):" #: editor/plugins/sprite_frames_editor_plugin.cpp @@ -10156,11 +10177,18 @@ msgid "Batch Rename" msgstr "批次é‡æ–°å‘½å" #: editor/rename_dialog.cpp -msgid "Prefix" +#, fuzzy +msgid "Replace:" +msgstr "å–代: " + +#: editor/rename_dialog.cpp +#, fuzzy +msgid "Prefix:" msgstr "å‰ç½®" #: editor/rename_dialog.cpp -msgid "Suffix" +#, fuzzy +msgid "Suffix:" msgstr "後置" #: editor/rename_dialog.cpp @@ -10208,7 +10236,8 @@ msgid "Per-level Counter" msgstr "å„級別分別計數器" #: editor/rename_dialog.cpp -msgid "If set the counter restarts for each group of child nodes" +#, fuzzy +msgid "If set, the counter restarts for each group of child nodes." msgstr "若啟用則計數器將ä¾æ“šæ¯çµ„å節點é‡æ–°å•Ÿå‹•" #: editor/rename_dialog.cpp @@ -10268,7 +10297,8 @@ msgid "Reset" msgstr "é‡è¨" #: editor/rename_dialog.cpp -msgid "Regular Expression Error" +#, fuzzy +msgid "Regular Expression Error:" msgstr "æ£è¦è¡¨ç¤ºå¼éŒ¯èª¤" #: editor/rename_dialog.cpp @@ -12270,6 +12300,11 @@ msgstr "" "GLES2 視訊驅動程å¼ä¸æ”¯æ´ GIProbs。\n" "請改為使用 BakedLightmap。" +#: scene/3d/interpolated_camera.cpp +msgid "" +"InterpolatedCamera has been deprecated and will be removed in Godot 4.0." +msgstr "" + #: scene/3d/light.cpp msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows." msgstr "角度大於 90 度的 SpotLight 無法投射出陰影。" @@ -12559,6 +12594,15 @@ msgstr "Varying 變數åªå¯åœ¨é ‚點函å¼ä¸æŒ‡æ´¾ã€‚" msgid "Constants cannot be modified." msgstr "ä¸å¯ä¿®æ”¹å¸¸æ•¸ã€‚" +#~ msgid "FileSystem and Import Docks" +#~ msgstr "檔案系統與匯入 Dock" + +#~ msgid "" +#~ "When exporting or deploying, the resulting executable will attempt to " +#~ "connect to the IP of this computer in order to be debugged." +#~ msgstr "" +#~ "匯出或部署時,輸出的å¯åŸ·è¡Œæª”將會嘗試連接到這å°é›»è…¦çš„ IP ä½ç½®ä»¥é€²è¡Œé™¤éŒ¯ã€‚" + #~ msgid "Current scene was never saved, please save it prior to running." #~ msgstr "ç›®å‰çš„å ´æ™¯å¾žæœªè¢«ä¿å˜ï¼Œè«‹å…ˆä¿å˜ä»¥åŸ·è¡Œã€‚" diff --git a/main/main.cpp b/main/main.cpp index ced8d7227a..5ebd0138d3 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1274,9 +1274,13 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } if (rtm >= 0 && rtm < 3) { +#ifdef NO_THREADS + rtm = OS::RENDER_THREAD_UNSAFE; // No threads available on this platform. +#else if (editor) { rtm = OS::RENDER_THREAD_SAFE; } +#endif OS::get_singleton()->_render_thread_mode = OS::RenderThreadMode(rtm); } @@ -1365,6 +1369,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph "0,33200,1,or_greater")); // No negative numbers GLOBAL_DEF("display/window/ios/hide_home_indicator", true); + GLOBAL_DEF("input_devices/pointing/ios/touch_delay", 0.150); Engine::get_singleton()->set_frame_delay(frame_delay); @@ -1565,7 +1570,6 @@ Error Main::setup2(Thread::ID p_main_tid_override) { Color boot_bg_color = GLOBAL_DEF("application/boot_splash/bg_color", boot_splash_bg_color); if (boot_logo.is_valid()) { - OS::get_singleton()->_msec_splash = OS::get_singleton()->get_ticks_msec(); RenderingServer::get_singleton()->set_boot_image(boot_logo, boot_bg_color, boot_logo_scale, boot_logo_filter); diff --git a/main/splash_editor.png b/main/splash_editor.png Binary files differindex 29931a71db..855646b346 100644 --- a/main/splash_editor.png +++ b/main/splash_editor.png diff --git a/methods.py b/methods.py index 8f14de6dac..f7134b472b 100644 --- a/methods.py +++ b/methods.py @@ -7,6 +7,8 @@ from collections import OrderedDict # We need to define our own `Action` method to control the verbosity of output # and whenever we need to run those commands in a subprocess on some platforms. from SCons.Script import Action +from SCons import Node +from SCons.Script import Glob from platform_methods import run_in_subprocess @@ -526,6 +528,35 @@ def generate_cpp_hint_file(filename): print("Could not write cpp.hint file.") +def glob_recursive(pattern, node="."): + results = [] + for f in Glob(str(node) + "/*", source=True): + if type(f) is Node.FS.Dir: + results += glob_recursive(pattern, f) + results += Glob(str(node) + "/" + pattern, source=True) + return results + + +def add_to_vs_project(env, sources): + for x in sources: + if type(x) == type(""): + fname = env.File(x).path + else: + fname = env.File(x)[0].path + pieces = fname.split(".") + if len(pieces) > 0: + basename = pieces[0] + basename = basename.replace("\\\\", "/") + if os.path.isfile(basename + ".h"): + env.vs_incs += [basename + ".h"] + elif os.path.isfile(basename + ".hpp"): + env.vs_incs += [basename + ".hpp"] + if os.path.isfile(basename + ".c"): + env.vs_srcs += [basename + ".c"] + elif os.path.isfile(basename + ".cpp"): + env.vs_srcs += [basename + ".cpp"] + + def generate_vs_project(env, num_jobs): batch_file = find_visual_c_batch_file(env) if batch_file: @@ -534,38 +565,44 @@ def generate_vs_project(env, num_jobs): common_build_prefix = [ 'cmd /V /C set "plat=$(PlatformTarget)"', '(if "$(PlatformTarget)"=="x64" (set "plat=x86_amd64"))', - 'set "tools=yes"', + 'set "tools=%s"' % env["tools"], '(if "$(Configuration)"=="release" (set "tools=no"))', - 'set "custom_modules=%s"' % env["custom_modules"], 'call "' + batch_file + '" !plat!', ] - result = " ^& ".join(common_build_prefix + [commands]) + # windows allows us to have spaces in paths, so we need + # to double quote off the directory. However, the path ends + # in a backslash, so we need to remove this, lest it escape the + # last double quote off, confusing MSBuild + common_build_postfix = [ + "--directory=\"$(ProjectDir.TrimEnd('\\'))\"", + "platform=windows", + "target=$(Configuration)", + "progress=no", + "tools=!tools!", + "-j%s" % num_jobs, + ] + + if env["custom_modules"]: + common_build_postfix.append("custom_modules=%s" % env["custom_modules"]) + + result = " ^& ".join(common_build_prefix + [" ".join([commands] + common_build_postfix)]) return result - env.AddToVSProject(env.core_sources) - env.AddToVSProject(env.main_sources) - env.AddToVSProject(env.modules_sources) - env.AddToVSProject(env.scene_sources) - env.AddToVSProject(env.servers_sources) - env.AddToVSProject(env.editor_sources) - - # windows allows us to have spaces in paths, so we need - # to double quote off the directory. However, the path ends - # in a backslash, so we need to remove this, lest it escape the - # last double quote off, confusing MSBuild - env["MSVSBUILDCOM"] = build_commandline( - "scons --directory=\"$(ProjectDir.TrimEnd('\\'))\" platform=windows progress=no target=$(Configuration)" - " tools=!tools! custom_modules=!custom_modules! -j" + str(num_jobs) - ) - env["MSVSREBUILDCOM"] = build_commandline( - "scons --directory=\"$(ProjectDir.TrimEnd('\\'))\" platform=windows progress=no target=$(Configuration)" - " tools=!tools! custom_modules=!custom_modules! vsproj=yes -j" + str(num_jobs) - ) - env["MSVSCLEANCOM"] = build_commandline( - "scons --directory=\"$(ProjectDir.TrimEnd('\\'))\" --clean platform=windows progress=no" - " target=$(Configuration) tools=!tools! custom_modules=!custom_modules! -j" + str(num_jobs) - ) + add_to_vs_project(env, env.core_sources) + add_to_vs_project(env, env.drivers_sources) + add_to_vs_project(env, env.main_sources) + add_to_vs_project(env, env.modules_sources) + add_to_vs_project(env, env.scene_sources) + add_to_vs_project(env, env.servers_sources) + add_to_vs_project(env, env.editor_sources) + + for header in glob_recursive("**/*.h"): + env.vs_incs.append(str(header)) + + env["MSVSBUILDCOM"] = build_commandline("scons") + env["MSVSREBUILDCOM"] = build_commandline("scons vsproj=yes") + env["MSVSCLEANCOM"] = build_commandline("scons --clean") # This version information (Win32, x64, Debug, Release, Release_Debug seems to be # required for Visual Studio to understand that it needs to generate an NMAKE diff --git a/misc/dist/html/full-size.html b/misc/dist/html/full-size.html index be25ce4839..58cf8ba4d8 100644 --- a/misc/dist/html/full-size.html +++ b/misc/dist/html/full-size.html @@ -147,6 +147,7 @@ $GODOT_HEAD_INCLUDE const MAIN_PACK = '$GODOT_BASENAME.pck'; const EXTRA_ARGS = JSON.parse('$GODOT_ARGS'); const INDETERMINATE_STATUS_STEP_MS = 100; + const FULL_WINDOW = $GODOT_FULL_WINDOW; var canvas = document.getElementById('canvas'); var statusProgress = document.getElementById('status-progress'); @@ -156,6 +157,9 @@ $GODOT_HEAD_INCLUDE var initializing = true; var statusMode = 'hidden'; + var lastWidth = 0; + var lastHeight = 0; + var lastScale = 0; var animationCallbacks = []; function animate(time) { @@ -165,14 +169,23 @@ $GODOT_HEAD_INCLUDE requestAnimationFrame(animate); function adjustCanvasDimensions() { - var scale = window.devicePixelRatio || 1; - var width = window.innerWidth; - var height = window.innerHeight; - canvas.width = width * scale; - canvas.height = height * scale; + const scale = window.devicePixelRatio || 1; + if (lastWidth != window.innerWidth || lastHeight != window.innerHeight || lastScale != scale) { + lastScale = scale; + lastWidth = window.innerWidth; + lastHeight = window.innerHeight; + canvas.width = Math.floor(lastWidth * scale); + canvas.height = Math.floor(lastHeight * scale); + canvas.style.width = lastWidth + "px"; + canvas.style.height = lastHeight + "px"; + } + } + if (FULL_WINDOW) { + animationCallbacks.push(adjustCanvasDimensions); + adjustCanvasDimensions(); + } else { + engine.setCanvasResizedOnStart(true); } - animationCallbacks.push(adjustCanvasDimensions); - adjustCanvasDimensions(); setStatusMode = function setStatusMode(mode) { diff --git a/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj b/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj index 9a1143a21a..d8da520ed7 100644 --- a/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj +++ b/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj @@ -386,7 +386,7 @@ CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; DEVELOPMENT_TEAM = $team_id; INFOPLIST_FILE = "$binary/$binary-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -416,7 +416,7 @@ CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; DEVELOPMENT_TEAM = $team_id; INFOPLIST_FILE = "$binary/$binary-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/modules/arkit/arkit_interface.h b/modules/arkit/arkit_interface.h index 5a2c50e213..29e09411ff 100644 --- a/modules/arkit/arkit_interface.h +++ b/modules/arkit/arkit_interface.h @@ -44,6 +44,15 @@ // forward declaration for some needed objects class ARKitShader; +#ifdef __OBJC__ + +typedef ARAnchor GodotARAnchor; + +#else + +typedef void GodotARAnchor; +#endif + class ARKitInterface : public XRInterface { GDCLASS(ARKitInterface, XRInterface); @@ -115,8 +124,8 @@ public: virtual void process() override; // called by delegate (void * because C++ and Obj-C don't always mix, should really change all platform/iphone/*.cpp files to .mm) - void _add_or_update_anchor(void *p_anchor); - void _remove_anchor(void *p_anchor); + void _add_or_update_anchor(GodotARAnchor *p_anchor); + void _remove_anchor(GodotARAnchor *p_anchor); ARKitInterface(); ~ARKitInterface(); diff --git a/modules/arkit/arkit_interface.mm b/modules/arkit/arkit_interface.mm index 3fb2cc933d..e8fa023ac7 100644 --- a/modules/arkit/arkit_interface.mm +++ b/modules/arkit/arkit_interface.mm @@ -306,12 +306,10 @@ void ARKitInterface::uninitialize() { remove_all_anchors(); if (@available(iOS 11.0, *)) { - [ar_session release]; - ar_session = NULL; + ar_session = nil; } - [ar_delegate release]; - ar_delegate = NULL; + ar_delegate = nil; initialized = false; session_was_started = false; } @@ -687,7 +685,7 @@ void ARKitInterface::process() { } } -void ARKitInterface::_add_or_update_anchor(void *p_anchor) { +void ARKitInterface::_add_or_update_anchor(GodotARAnchor *p_anchor) { // _THREAD_SAFE_METHOD_ if (@available(iOS 11.0, *)) { @@ -749,7 +747,7 @@ void ARKitInterface::_add_or_update_anchor(void *p_anchor) { } } -void ARKitInterface::_remove_anchor(void *p_anchor) { +void ARKitInterface::_remove_anchor(GodotARAnchor *p_anchor) { // _THREAD_SAFE_METHOD_ if (@available(iOS 11.0, *)) { @@ -768,7 +766,7 @@ ARKitInterface::ARKitInterface() { plane_detection_is_enabled = false; light_estimation_is_enabled = false; if (@available(iOS 11.0, *)) { - ar_session = NULL; + ar_session = nil; } z_near = 0.01; z_far = 1000.0; diff --git a/modules/bullet/bullet_types_converter.cpp b/modules/bullet/bullet_types_converter.cpp index c9493d8892..09b90fe09e 100644 --- a/modules/bullet/bullet_types_converter.cpp +++ b/modules/bullet/bullet_types_converter.cpp @@ -95,12 +95,61 @@ void G_TO_B(Transform const &inVal, btTransform &outVal) { } void UNSCALE_BT_BASIS(btTransform &scaledBasis) { - btMatrix3x3 &m(scaledBasis.getBasis()); - btVector3 column0(m[0][0], m[1][0], m[2][0]); - btVector3 column1(m[0][1], m[1][1], m[2][1]); - btVector3 column2(m[0][2], m[1][2], m[2][2]); + btMatrix3x3 &basis(scaledBasis.getBasis()); + btVector3 column0 = basis.getColumn(0); + btVector3 column1 = basis.getColumn(1); + btVector3 column2 = basis.getColumn(2); + + // Check for zero scaling. + if (column0.fuzzyZero()) { + if (column1.fuzzyZero()) { + if (column2.fuzzyZero()) { + // All dimensions are fuzzy zero. Create a default basis. + column0 = btVector3(1, 0, 0); + column1 = btVector3(0, 1, 0); + column2 = btVector3(0, 0, 1); + } else { // Column 2 scale not fuzzy zero. + // Create two vectors orthogonal to row 2. + // Ensure that a default basis is created if row 2 = <0, 0, 1> + column1 = btVector3(0, column2[2], -column2[1]); + column0 = column1.cross(column2); + } + } else { // Column 1 scale not fuzzy zero. + if (column2.fuzzyZero()) { + // Create two vectors othogonal to column 1. + // Ensure that a default basis is created if column 1 = <0, 1, 0> + column0 = btVector3(column1[1], -column1[0], 0); + column2 = column0.cross(column1); + } else { // Column 1 and column 2 scales not fuzzy zero. + // Create column 0 orthogonal to column 1 and column 2. + column0 = column1.cross(column2); + } + } + } else { // Column 0 scale not fuzzy zero. + if (column1.fuzzyZero()) { + if (column2.fuzzyZero()) { + // Create two vectors orthogonal to column 0. + // Ensure that a default basis is created if column 0 = <1, 0, 0> + column2 = btVector3(-column0[2], 0, column0[0]); + column1 = column2.cross(column0); + } else { // Column 0 and column 2 scales not fuzzy zero. + // Create column 1 orthogonal to column 0 and column 2. + column1 = column2.cross(column0); + } + } else { // Column 0 and column 1 scales not fuzzy zero. + if (column2.fuzzyZero()) { + // Create column 2 orthogonal to column 0 and column 1. + column2 = column0.cross(column1); + } + } + } + + // Normalize column0.normalize(); column1.normalize(); column2.normalize(); - m.setValue(column0[0], column1[0], column2[0], column0[1], column1[1], column2[1], column0[2], column1[2], column2[2]); + + basis.setValue(column0[0], column1[0], column2[0], + column0[1], column1[1], column2[1], + column0[2], column1[2], column2[2]); } diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp index 32c3240a35..f517eecf64 100644 --- a/modules/bullet/rigid_body_bullet.cpp +++ b/modules/bullet/rigid_body_bullet.cpp @@ -849,8 +849,8 @@ void RigidBodyBullet::on_enter_area(AreaBullet *p_area) { } else { if (areasWhereIam[i]->get_spOv_priority() > p_area->get_spOv_priority()) { // The position was found, just shift all elements - for (int j = i; j < areaWhereIamCount; ++j) { - areasWhereIam[j + 1] = areasWhereIam[j]; + for (int j = areaWhereIamCount; j > i; j--) { + areasWhereIam[j] = areasWhereIam[j - 1]; } areasWhereIam[i] = p_area; break; diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp index d0515e7c97..9f4bfe3cef 100644 --- a/modules/bullet/space_bullet.cpp +++ b/modules/bullet/space_bullet.cpp @@ -959,8 +959,8 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform &p_f SceneTree::get_singleton()->get_current_scene()->add_child(motionVec); SceneTree::get_singleton()->get_current_scene()->add_child(normalLine); - motionVec->set_as_toplevel(true); - normalLine->set_as_toplevel(true); + motionVec->set_as_top_level(true); + normalLine->set_as_top_level(true); red_mat = Ref<StandardMaterial3D>(memnew(StandardMaterial3D)); red_mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED); diff --git a/modules/camera/camera_ios.mm b/modules/camera/camera_ios.mm index c10b13b2af..e4cb928805 100644 --- a/modules/camera/camera_ios.mm +++ b/modules/camera/camera_ios.mm @@ -124,18 +124,12 @@ if (output) { [self removeOutput:output]; [output setSampleBufferDelegate:nil queue:NULL]; - [output release]; output = nil; } [self commitConfiguration]; } -- (void)dealloc { - // bye bye - [super dealloc]; -} - - (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection { // This gets called every time our camera has a new image for us to process. // May need to investigate in a way to throttle this if we get more images then we're rendering frames.. @@ -272,7 +266,6 @@ CameraFeedIOS::CameraFeedIOS() { void CameraFeedIOS::set_device(AVCaptureDevice *p_device) { device = p_device; - [device retain]; // get some info NSString *device_name = p_device.localizedName; @@ -286,14 +279,12 @@ void CameraFeedIOS::set_device(AVCaptureDevice *p_device) { }; CameraFeedIOS::~CameraFeedIOS() { - if (capture_session != NULL) { - [capture_session release]; - capture_session = NULL; + if (capture_session) { + capture_session = nil; }; - if (device != NULL) { - [device release]; - device = NULL; + if (device) { + device = nil; }; }; @@ -312,8 +303,7 @@ void CameraFeedIOS::deactivate_feed() { // end camera capture if we have one if (capture_session) { [capture_session cleanup]; - [capture_session release]; - capture_session = NULL; + capture_session = nil; }; }; @@ -347,8 +337,6 @@ void CameraFeedIOS::deactivate_feed() { // remove notifications [[NSNotificationCenter defaultCenter] removeObserver:self name:AVCaptureDeviceWasConnectedNotification object:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self name:AVCaptureDeviceWasDisconnectedNotification object:nil]; - - [super dealloc]; } @end @@ -453,5 +441,5 @@ CameraIOS::CameraIOS() { }; CameraIOS::~CameraIOS() { - [device_notifications release]; + device_notifications = nil; }; diff --git a/modules/gdnative/gdnative_library_editor_plugin.cpp b/modules/gdnative/gdnative_library_editor_plugin.cpp index fdd755845f..f0f095ddf5 100644 --- a/modules/gdnative/gdnative_library_editor_plugin.cpp +++ b/modules/gdnative/gdnative_library_editor_plugin.cpp @@ -318,6 +318,7 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() { platform_ios.name = "iOS"; platform_ios.entries.push_back("armv7"); platform_ios.entries.push_back("arm64"); + platform_ios.entries.push_back("x86_64"); // iOS can use both Static and Dynamic libraries. // Frameworks is actually a folder with files. platform_ios.library_extension = "*.framework; Framework, *.xcframework; Binary Framework, *.a; Static Library, *.dylib; Dynamic Library"; diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml index e528fc6623..fc27892099 100644 --- a/modules/gdscript/doc_classes/@GDScript.xml +++ b/modules/gdscript/doc_classes/@GDScript.xml @@ -369,24 +369,19 @@ <description> Returns the floating-point modulus of [code]a/b[/code] that wraps equally in positive and negative. [codeblock] - var i = -6 - while i < 5: - prints(i, fposmod(i, 3)) - i += 1 + for i in 7: + var x = 0.5 * i - 1.5 + print("%4.1f %4.1f %4.1f" % [x, fmod(x, 1.5), fposmod(x, 1.5)]) [/codeblock] Produces: [codeblock] - -6 0 - -5 1 - -4 2 - -3 0 - -2 1 - -1 2 - 0 0 - 1 1 - 2 2 - 3 0 - 4 1 + -1.5 -0.0 0.0 + -1.0 -1.0 0.5 + -0.5 -0.5 1.0 + 0.0 0.0 0.0 + 0.5 0.5 0.5 + 1.0 1.0 1.0 + 1.5 0.0 0.0 [/codeblock] </description> </method> @@ -632,6 +627,7 @@ var main = load("res://main.tscn") # main will contain a PackedScene resource. [/codeblock] [b]Important:[/b] The path must be absolute, a local path will just return [code]null[/code]. + This method is a simplified version of [method ResourceLoader.load], which can be used for more advanced scenarios. </description> </method> <method name="log"> @@ -771,24 +767,18 @@ <description> Returns the integer modulus of [code]a/b[/code] that wraps equally in positive and negative. [codeblock] - var i = -6 - while i < 5: - prints(i, posmod(i, 3)) - i += 1 + for i in range(-3, 4): + print("%2d %2d %2d" % [i, i % 3, posmod(i, 3)]) [/codeblock] Produces: [codeblock] - -6 0 - -5 1 - -4 2 - -3 0 - -2 1 - -1 2 - 0 0 - 1 1 - 2 2 - 3 0 - 4 1 + -3 0 0 + -2 -2 1 + -1 -1 2 + 0 0 0 + 1 1 1 + 2 2 2 + 3 0 0 [/codeblock] </description> </method> @@ -829,6 +819,7 @@ a = [1, 2, 3] print("a", "b", a) # Prints ab[1, 2, 3] [/codeblock] + [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. </description> </method> <method name="print_debug" qualifiers="vararg"> @@ -902,6 +893,7 @@ [codeblock] push_error("test error") # Prints "test error" to debugger and terminal as error call [/codeblock] + [b]Note:[/b] Errors printed this way will not pause project execution. To print an error message and pause project execution in debug builds, use [code]assert(false, "test error")[/code] instead. </description> </method> <method name="push_warning"> @@ -991,27 +983,15 @@ <description> Returns an array with the given range. Range can be 1 argument N (0 to N-1), two arguments (initial, final-1) or three arguments (initial, final-1, increment). [codeblock] - for i in range(4): - print(i) - for i in range(2, 5): - print(i) - for i in range(0, 6, 2): - print(i) + print(range(4)) + print(range(2, 5)) + print(range(0, 6, 2)) [/codeblock] Output: [codeblock] - 0 - 1 - 2 - 3 - - 2 - 3 - 4 - - 0 - 2 - 4 + [0, 1, 2, 3] + [2, 3, 4] + [0, 2, 4] [/codeblock] </description> </method> diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp index 9a3273d201..7f7410a92c 100644 --- a/modules/gdscript/editor/gdscript_highlighter.cpp +++ b/modules/gdscript/editor/gdscript_highlighter.cpp @@ -73,6 +73,13 @@ Dictionary GDScriptSyntaxHighlighter::_get_line_syntax_highlighting(int p_line) color_region_cache[p_line] = -1; int in_region = -1; if (p_line != 0) { + int prev_region_line = p_line - 1; + while (prev_region_line > 0 && !color_region_cache.has(prev_region_line)) { + prev_region_line--; + } + for (int i = prev_region_line; i < p_line - 1; i++) { + get_line_syntax_highlighting(i); + } if (!color_region_cache.has(p_line - 1)) { get_line_syntax_highlighting(p_line - 1); } diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 0263e32c5b..e70e3f7272 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -1044,8 +1044,10 @@ GDScript::~GDScript() { MutexLock lock(GDScriptLanguage::get_singleton()->lock); while (SelfList<GDScriptFunctionState> *E = pending_func_states.first()) { - E->self()->_clear_stack(); + // Order matters since clearing the stack may already cause + // the GDSCriptFunctionState to be destroyed and thus removed from the list. pending_func_states.remove(E); + E->self()->_clear_stack(); } } @@ -1053,7 +1055,9 @@ GDScript::~GDScript() { memdelete(E->get()); } - GDScriptCache::remove_script(get_path()); + if (GDScriptCache::singleton) { // Cache may have been already destroyed at engine shutdown. + GDScriptCache::remove_script(get_path()); + } _save_orphaned_subclasses(); @@ -1449,8 +1453,10 @@ GDScriptInstance::~GDScriptInstance() { MutexLock lock(GDScriptLanguage::get_singleton()->lock); while (SelfList<GDScriptFunctionState> *E = pending_func_states.first()) { - E->self()->_clear_stack(); + // Order matters since clearing the stack may already cause + // the GDSCriptFunctionState to be destroyed and thus removed from the list. pending_func_states.remove(E); + E->self()->_clear_stack(); } if (script.is_valid() && owner) { @@ -2035,7 +2041,33 @@ GDScriptLanguage::~GDScriptLanguage() { if (_call_stack) { memdelete_arr(_call_stack); } - singleton = nullptr; + + // Clear dependencies between scripts, to ensure cyclic references are broken (to avoid leaks at exit). + SelfList<GDScript> *s = script_list.first(); + while (s) { + GDScript *script = s->self(); + // This ensures the current script is not released before we can check what's the next one + // in the list (we can't get the next upfront because we don't know if the reference breaking + // will cause it -or any other after it, for that matter- to be released so the next one + // is not the same as before). + script->reference(); + + for (Map<StringName, GDScriptFunction *>::Element *E = script->member_functions.front(); E; E = E->next()) { + GDScriptFunction *func = E->get(); + for (int i = 0; i < func->argument_types.size(); i++) { + func->argument_types.write[i].script_type_ref = Ref<Script>(); + } + func->return_type.script_type_ref = Ref<Script>(); + } + for (Map<StringName, GDScript::MemberInfo>::Element *E = script->member_indices.front(); E; E = E->next()) { + E->get().data_type.script_type_ref = Ref<Script>(); + } + + s = s->next(); + script->unreference(); + } + + singleton = NULL; } void GDScriptLanguage::add_orphan_subclass(const String &p_qualified_name, const ObjectID &p_subclass) { diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index b4ede55f0a..943a49060f 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -1286,7 +1286,7 @@ void GDScriptAnalyzer::resolve_parameter(GDScriptParser::ParameterNode *p_parame if (p_parameter->default_value != nullptr) { if (!is_type_compatible(result, p_parameter->default_value->get_datatype())) { - push_error(vformat(R"(Type of default value for parameter "%s" (%s) is not compatible with paremeter type (%s).)", p_parameter->identifier->name, p_parameter->default_value->get_datatype().to_string(), p_parameter->datatype_specifier->get_datatype().to_string()), p_parameter->default_value); + push_error(vformat(R"(Type of default value for parameter "%s" (%s) is not compatible with parameter type (%s).)", p_parameter->identifier->name, p_parameter->default_value->get_datatype().to_string(), p_parameter->datatype_specifier->get_datatype().to_string()), p_parameter->default_value); } else if (p_parameter->default_value->get_datatype().is_variant()) { mark_node_unsafe(p_parameter); } diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index c3d651ee79..bad450c9f9 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -76,7 +76,7 @@ void GDScriptCompiler::_set_error(const String &p_error, const GDScriptParser::N } } -GDScriptDataType GDScriptCompiler::_gdtype_from_datatype(const GDScriptParser::DataType &p_datatype) const { +GDScriptDataType GDScriptCompiler::_gdtype_from_datatype(const GDScriptParser::DataType &p_datatype, GDScript *p_owner) const { if (!p_datatype.is_set() || !p_datatype.is_hard_type()) { return GDScriptDataType(); } @@ -98,7 +98,7 @@ GDScriptDataType GDScriptCompiler::_gdtype_from_datatype(const GDScriptParser::D } break; case GDScriptParser::DataType::SCRIPT: { result.kind = GDScriptDataType::SCRIPT; - result.script_type = p_datatype.script_type; + result.script_type = Ref<Script>(p_datatype.script_type).ptr(); result.native_type = result.script_type->get_instance_base_type(); } break; case GDScriptParser::DataType::CLASS: { @@ -124,11 +124,11 @@ GDScriptDataType GDScriptCompiler::_gdtype_from_datatype(const GDScriptParser::D names.pop_back(); } result.kind = GDScriptDataType::GDSCRIPT; - result.script_type = script; + result.script_type = script.ptr(); result.native_type = script->get_instance_base_type(); } else { result.kind = GDScriptDataType::GDSCRIPT; - result.script_type = GDScriptCache::get_shallow_script(p_datatype.script_path, main_script->path); + result.script_type = GDScriptCache::get_shallow_script(p_datatype.script_path, main_script->path).ptr(); result.native_type = p_datatype.native_type; } } @@ -149,6 +149,12 @@ GDScriptDataType GDScriptCompiler::_gdtype_from_datatype(const GDScriptParser::D } } + // Only hold strong reference to the script if it's not the owner of the + // element qualified with this type, to avoid cyclic references (leaks). + if (result.script_type && result.script_type != p_owner) { + result.script_type_ref = Ref<Script>(result.script_type); + } + return result; } @@ -1668,7 +1674,7 @@ Error GDScriptCompiler::_parse_function(GDScript *p_script, const GDScriptParser func_name = p_func->identifier->name; is_static = p_func->is_static; rpc_mode = p_func->rpc_mode; - return_type = _gdtype_from_datatype(p_func->get_datatype()); + return_type = _gdtype_from_datatype(p_func->get_datatype(), p_script); } else { if (p_for_ready) { func_name = "_ready"; @@ -1685,7 +1691,7 @@ Error GDScriptCompiler::_parse_function(GDScript *p_script, const GDScriptParser if (p_func) { for (int i = 0; i < p_func->parameters.size(); i++) { const GDScriptParser::ParameterNode *parameter = p_func->parameters[i]; - GDScriptDataType par_type = _gdtype_from_datatype(parameter->get_datatype()); + GDScriptDataType par_type = _gdtype_from_datatype(parameter->get_datatype(), p_script); uint32_t par_addr = codegen.generator->add_parameter(parameter->identifier->name, parameter->default_value != nullptr, par_type); codegen.parameters[parameter->identifier->name] = GDScriptCodeGenerator::Address(GDScriptCodeGenerator::Address::FUNCTION_PARAMETER, par_addr, par_type); @@ -1830,7 +1836,7 @@ Error GDScriptCompiler::_parse_setter_getter(GDScript *p_script, const GDScriptP return_type.kind = GDScriptDataType::BUILTIN; return_type.builtin_type = Variant::NIL; } else { - return_type = _gdtype_from_datatype(p_variable->get_datatype()); + return_type = _gdtype_from_datatype(p_variable->get_datatype(), p_script); } codegen.generator->write_start(p_script, func_name, false, p_variable->rpc_mode, return_type); @@ -1927,7 +1933,7 @@ Error GDScriptCompiler::_parse_class_level(GDScript *p_script, const GDScriptPar p_script->native = native; } break; case GDScriptDataType::GDSCRIPT: { - Ref<GDScript> base = base_type.script_type; + Ref<GDScript> base = Ref<GDScript>(base_type.script_type); p_script->base = base; p_script->_base = base.ptr(); @@ -1994,7 +2000,7 @@ Error GDScriptCompiler::_parse_class_level(GDScript *p_script, const GDScriptPar break; } minfo.rpc_mode = variable->rpc_mode; - minfo.data_type = _gdtype_from_datatype(variable->get_datatype()); + minfo.data_type = _gdtype_from_datatype(variable->get_datatype(), p_script); PropertyInfo prop_info = minfo.data_type; prop_info.name = name; diff --git a/modules/gdscript/gdscript_compiler.h b/modules/gdscript/gdscript_compiler.h index 80fba6a934..db02079d26 100644 --- a/modules/gdscript/gdscript_compiler.h +++ b/modules/gdscript/gdscript_compiler.h @@ -84,7 +84,7 @@ class GDScriptCompiler { Ref<Script> script = obj->get_script(); if (script.is_valid()) { - type.script_type = script; + type.script_type = script.ptr(); Ref<GDScript> gdscript = script; if (gdscript.is_valid()) { type.kind = GDScriptDataType::GDSCRIPT; @@ -125,7 +125,7 @@ class GDScriptCompiler { Error _create_binary_operator(CodeGen &codegen, const GDScriptParser::BinaryOpNode *on, Variant::Operator op, bool p_initializer = false, const GDScriptCodeGenerator::Address &p_index_addr = GDScriptCodeGenerator::Address()); Error _create_binary_operator(CodeGen &codegen, const GDScriptParser::ExpressionNode *p_left_operand, const GDScriptParser::ExpressionNode *p_right_operand, Variant::Operator op, bool p_initializer = false, const GDScriptCodeGenerator::Address &p_index_addr = GDScriptCodeGenerator::Address()); - GDScriptDataType _gdtype_from_datatype(const GDScriptParser::DataType &p_datatype) const; + GDScriptDataType _gdtype_from_datatype(const GDScriptParser::DataType &p_datatype, GDScript *p_owner = nullptr) const; GDScriptCodeGenerator::Address _parse_assign_right_expression(CodeGen &codegen, Error &r_error, const GDScriptParser::AssignmentNode *p_assignmentint, const GDScriptCodeGenerator::Address &p_index_addr = GDScriptCodeGenerator::Address()); GDScriptCodeGenerator::Address _parse_expression(CodeGen &codegen, Error &r_error, const GDScriptParser::ExpressionNode *p_expression, bool p_root = false, bool p_initializer = false, const GDScriptCodeGenerator::Address &p_index_addr = GDScriptCodeGenerator::Address()); diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h index d1c98a5456..c98ac09310 100644 --- a/modules/gdscript/gdscript_function.h +++ b/modules/gdscript/gdscript_function.h @@ -56,7 +56,8 @@ struct GDScriptDataType { bool has_type = false; Variant::Type builtin_type = Variant::NIL; StringName native_type; - Ref<Script> script_type; + Script *script_type = nullptr; + Ref<Script> script_type_ref; bool is_type(const Variant &p_variant, bool p_allow_implicit_conversion = false) const { if (!has_type) { diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index e8dea8180a..2a69db130b 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -1042,7 +1042,7 @@ GDScriptParser::EnumNode *GDScriptParser::parse_enum() { if (check(GDScriptTokenizer::Token::BRACE_CLOSE)) { break; // Allow trailing comma. } - if (consume(GDScriptTokenizer::Token::IDENTIFIER, R"(Expected identifer for enum key.)")) { + if (consume(GDScriptTokenizer::Token::IDENTIFIER, R"(Expected identifier for enum key.)")) { EnumNode::Value item; item.identifier = parse_identifier(); item.parent_enum = enum_node; @@ -2516,7 +2516,7 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_call(ExpressionNode *p_pre GDScriptParser::ExpressionNode *GDScriptParser::parse_get_node(ExpressionNode *p_previous_operand, bool p_can_assign) { if (match(GDScriptTokenizer::Token::LITERAL)) { if (previous.literal.get_type() != Variant::STRING) { - push_error(R"(Expect node path as string or identifer after "$".)"); + push_error(R"(Expect node path as string or identifier after "$".)"); return nullptr; } GetNodeNode *get_node = alloc_node<GetNodeNode>(); @@ -2539,7 +2539,7 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_get_node(ExpressionNode *p } while (match(GDScriptTokenizer::Token::SLASH)); return get_node; } else { - push_error(R"(Expect node path as string or identifer after "$".)"); + push_error(R"(Expect node path as string or identifier after "$".)"); return nullptr; } } diff --git a/modules/gdscript/gdscript_tokenizer.cpp b/modules/gdscript/gdscript_tokenizer.cpp index ed27604aec..9a40aa50ac 100644 --- a/modules/gdscript/gdscript_tokenizer.cpp +++ b/modules/gdscript/gdscript_tokenizer.cpp @@ -578,7 +578,7 @@ GDScriptTokenizer::Token GDScriptTokenizer::potential_identifier() { } void GDScriptTokenizer::newline(bool p_make_token) { - // Don't overwrite previous newline, nor create if we want a line contination. + // Don't overwrite previous newline, nor create if we want a line continuation. if (p_make_token && !pending_newline && !line_continuation) { Token newline(Token::NEWLINE); newline.start_line = line; diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml index 57fbc5bfc0..4dccb03369 100644 --- a/modules/gridmap/doc_classes/GridMap.xml +++ b/modules/gridmap/doc_classes/GridMap.xml @@ -11,6 +11,8 @@ </description> <tutorials> <link title="Using gridmaps">https://docs.godotengine.org/en/latest/tutorials/3d/using_gridmaps.html</link> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> + <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link> </tutorials> <methods> <method name="clear"> diff --git a/modules/jsonrpc/jsonrpc.cpp b/modules/jsonrpc/jsonrpc.cpp index 7bb70b098f..320da182f8 100644 --- a/modules/jsonrpc/jsonrpc.cpp +++ b/modules/jsonrpc/jsonrpc.cpp @@ -98,6 +98,10 @@ Variant JSONRPC::process_action(const Variant &p_action, bool p_process_arr_elem if (p_action.get_type() == Variant::DICTIONARY) { Dictionary dict = p_action; String method = dict.get("method", ""); + if (method.begins_with("$/")) { + return ret; + } + Array args; if (dict.has("params")) { Variant params = dict.get("params", Variant()); diff --git a/modules/mbedtls/crypto_mbedtls.cpp b/modules/mbedtls/crypto_mbedtls.cpp index 501bfff075..12a982df6e 100644 --- a/modules/mbedtls/crypto_mbedtls.cpp +++ b/modules/mbedtls/crypto_mbedtls.cpp @@ -43,8 +43,8 @@ #define PEM_BEGIN_CRT "-----BEGIN CERTIFICATE-----\n" #define PEM_END_CRT "-----END CERTIFICATE-----\n" -#include "mbedtls/pem.h" #include <mbedtls/debug.h> +#include <mbedtls/pem.h> CryptoKey *CryptoKeyMbedTLS::create() { return memnew(CryptoKeyMbedTLS); @@ -294,20 +294,15 @@ Ref<X509Certificate> CryptoMbedTLS::generate_self_signed_certificate(Ref<CryptoK unsigned char buf[4096]; memset(buf, 0, 4096); - Ref<X509CertificateMbedTLS> out; - out.instance(); - mbedtls_x509write_crt_pem(&crt, buf, 4096, mbedtls_ctr_drbg_random, &ctr_drbg); - - int err = mbedtls_x509_crt_parse(&(out->cert), buf, 4096); - if (err != 0) { - mbedtls_mpi_free(&serial); - mbedtls_x509write_crt_free(&crt); - ERR_PRINT("Generated invalid certificate: " + itos(err)); - return nullptr; - } - + int ret = mbedtls_x509write_crt_pem(&crt, buf, 4096, mbedtls_ctr_drbg_random, &ctr_drbg); mbedtls_mpi_free(&serial); mbedtls_x509write_crt_free(&crt); + ERR_FAIL_COND_V_MSG(ret != 0, nullptr, "Failed to generate certificate: " + itos(ret)); + buf[4095] = '\0'; // Make sure strlen can't fail. + + Ref<X509CertificateMbedTLS> out; + out.instance(); + out->load_from_memory(buf, strlen((char *)buf) + 1); // Use strlen to find correct output size. return out; } diff --git a/modules/mono/build_scripts/mono_configure.py b/modules/mono/build_scripts/mono_configure.py index e959312393..6057004166 100644 --- a/modules/mono/build_scripts/mono_configure.py +++ b/modules/mono/build_scripts/mono_configure.py @@ -396,9 +396,8 @@ def configure(env, env_mono): mono_root = subprocess.check_output(["pkg-config", "mono-2", "--variable=prefix"]).decode("utf8").strip() if tools_enabled: + # Only supported for editor builds. copy_mono_root_files(env, mono_root) - else: - print("Ignoring option: 'copy_mono_root'; only available for builds with 'tools' enabled.") def make_template_dir(env, mono_root): diff --git a/modules/mono/config.py b/modules/mono/config.py index cd659057ef..d060ae9b28 100644 --- a/modules/mono/config.py +++ b/modules/mono/config.py @@ -23,18 +23,16 @@ def configure(env): envvars.Add( PathVariable( "mono_prefix", - "Path to the mono installation directory for the target platform and architecture", + "Path to the Mono installation directory for the target platform and architecture", "", PathVariable.PathAccept, ) ) - envvars.Add(BoolVariable("mono_static", "Statically link mono", default_mono_static)) - envvars.Add(BoolVariable("mono_glue", "Build with the mono glue sources", True)) + envvars.Add(BoolVariable("mono_static", "Statically link Mono", default_mono_static)) + envvars.Add(BoolVariable("mono_glue", "Build with the Mono glue sources", True)) envvars.Add(BoolVariable("build_cil", "Build C# solutions", True)) envvars.Add( - BoolVariable( - "copy_mono_root", "Make a copy of the mono installation directory to bundle with the editor", False - ) + BoolVariable("copy_mono_root", "Make a copy of the Mono installation directory to bundle with the editor", True) ) # TODO: It would be great if this could be detected automatically instead diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index bbdec224f0..a05b38b8bf 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -2702,7 +2702,7 @@ bool CSharpScript::_get_member_export(IMonoClassMember *p_member, bool p_inspect if (!property->has_getter()) { #ifdef TOOLS_ENABLED if (exported) { - ERR_PRINT("Read-only property cannot be exported: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'."); + ERR_PRINT("Cannot export a property without a getter: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'."); } #endif return false; @@ -2710,7 +2710,7 @@ bool CSharpScript::_get_member_export(IMonoClassMember *p_member, bool p_inspect if (!property->has_setter()) { #ifdef TOOLS_ENABLED if (exported) { - ERR_PRINT("Write-only property (without getter) cannot be exported: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'."); + ERR_PRINT("Cannot export a property without a setter: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'."); } #endif return false; diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props b/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props index dfc59e6ccb..5febcf3175 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props @@ -14,15 +14,15 @@ <GodotProjectDir Condition=" '$(SolutionDir)' == '' ">$(MSBuildProjectDirectory)</GodotProjectDir> <GodotProjectDir>$([MSBuild]::EnsureTrailingSlash('$(GodotProjectDir)'))</GodotProjectDir> - <!-- Custom output paths for Godot projects. In brief, 'bin\' and 'obj\' are moved to '$(GodotProjectDir)\.mono\temp\'. --> - <BaseOutputPath>$(GodotProjectDir).mono\temp\bin\</BaseOutputPath> - <OutputPath>$(GodotProjectDir).mono\temp\bin\$(Configuration)\</OutputPath> + <!-- Custom output paths for Godot projects. In brief, 'bin\' and 'obj\' are moved to '$(GodotProjectDir)\.godot\mono\temp\'. --> + <BaseOutputPath>$(GodotProjectDir).godot\mono\temp\bin\</BaseOutputPath> + <OutputPath>$(GodotProjectDir).godot\mono\temp\bin\$(Configuration)\</OutputPath> <!-- Use custom IntermediateOutputPath and BaseIntermediateOutputPath only if it wasn't already set. Otherwise the old values may have already been changed by MSBuild which can cause problems with NuGet. --> - <IntermediateOutputPath Condition=" '$(IntermediateOutputPath)' == '' ">$(GodotProjectDir).mono\temp\obj\$(Configuration)\</IntermediateOutputPath> - <BaseIntermediateOutputPath Condition=" '$(BaseIntermediateOutputPath)' == '' ">$(GodotProjectDir).mono\temp\obj\</BaseIntermediateOutputPath> + <IntermediateOutputPath Condition=" '$(IntermediateOutputPath)' == '' ">$(GodotProjectDir).godot\mono\temp\obj\$(Configuration)\</IntermediateOutputPath> + <BaseIntermediateOutputPath Condition=" '$(BaseIntermediateOutputPath)' == '' ">$(GodotProjectDir).godot\mono\temp\obj\</BaseIntermediateOutputPath> <!-- Do not append the target framework name to the output path. --> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> @@ -88,7 +88,7 @@ <PropertyGroup> <!-- ExportDebug also defines DEBUG like Debug does. --> <DefineConstants Condition=" '$(Configuration)' == 'ExportDebug' ">$(DefineConstants);DEBUG</DefineConstants> - <!-- Debug defines TOOLS to differenciate between Debug and ExportDebug configurations. --> + <!-- Debug defines TOOLS to differentiate between Debug and ExportDebug configurations. --> <DefineConstants Condition=" '$(Configuration)' == 'Debug' ">$(DefineConstants);TOOLS</DefineConstants> <DefineConstants>$(GodotDefineConstants);$(DefineConstants)</DefineConstants> @@ -102,11 +102,11 @@ --> <Reference Include="GodotSharp"> <Private>false</Private> - <HintPath>$(GodotProjectDir).mono\assemblies\$(GodotApiConfiguration)\GodotSharp.dll</HintPath> + <HintPath>$(GodotProjectDir).godot\mono\assemblies\$(GodotApiConfiguration)\GodotSharp.dll</HintPath> </Reference> <Reference Include="GodotSharpEditor" Condition=" '$(Configuration)' == 'Debug' "> <Private>false</Private> - <HintPath>$(GodotProjectDir).mono\assemblies\$(GodotApiConfiguration)\GodotSharpEditor.dll</HintPath> + <HintPath>$(GodotProjectDir).godot\mono\assemblies\$(GodotApiConfiguration)\GodotSharpEditor.dll</HintPath> </Reference> </ItemGroup> </Project> diff --git a/modules/mono/editor/GodotTools/GodotTools.IdeMessaging/Client.cs b/modules/mono/editor/GodotTools/GodotTools.IdeMessaging/Client.cs index 572c541412..0f50c90531 100644 --- a/modules/mono/editor/GodotTools/GodotTools.IdeMessaging/Client.cs +++ b/modules/mono/editor/GodotTools/GodotTools.IdeMessaging/Client.cs @@ -121,7 +121,7 @@ namespace GodotTools.IdeMessaging this.messageHandler = messageHandler; this.logger = logger; - string projectMetadataDir = Path.Combine(godotProjectDir, ".mono", "metadata"); + string projectMetadataDir = Path.Combine(godotProjectDir, ".godot", "mono", "metadata"); MetaFilePath = Path.Combine(projectMetadataDir, GodotIdeMetadata.DefaultFileName); diff --git a/modules/mono/editor/GodotTools/GodotTools/Export/AotBuilder.cs b/modules/mono/editor/GodotTools/GodotTools/Export/AotBuilder.cs index f60e469503..42ede3f3f3 100755 --- a/modules/mono/editor/GodotTools/GodotTools/Export/AotBuilder.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Export/AotBuilder.cs @@ -328,7 +328,7 @@ MONO_AOT_MODE_LAST = 1000, if (lipoExitCode != 0) throw new Exception($"Command 'lipo' exited with code: {lipoExitCode}"); - // TODO: Add the AOT lib and interpreter libs as device only to supress warnings when targeting the simulator + // TODO: Add the AOT lib and interpreter libs as device only to suppress warnings when targeting the simulator // Add the fat AOT static library to the Xcode project exporter.AddIosProjectStaticLib(fatOutputFilePath); diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs index 5aba31c622..3f1120575f 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs @@ -207,7 +207,7 @@ namespace Godot } } - internal Quat RotationQuat() + public Quat RotationQuat() { Basis orthonormalizedBasis = Orthonormalized(); real_t det = orthonormalizedBasis.Determinant(); diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs index 41b4e9367f..bd1dbc1229 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs @@ -440,7 +440,12 @@ namespace Godot // </summary> public static bool IsAbsPath(this string instance) { - return System.IO.Path.IsPathRooted(instance); + if (string.IsNullOrEmpty(instance)) + return false; + else if (instance.Length > 1) + return instance[0] == '/' || instance[0] == '\\' || instance.Contains(":/") || instance.Contains(":\\"); + else + return instance[0] == '/' || instance[0] == '\\'; } // <summary> @@ -448,7 +453,7 @@ namespace Godot // </summary> public static bool IsRelPath(this string instance) { - return !System.IO.Path.IsPathRooted(instance); + return !IsAbsPath(instance); } // <summary> @@ -624,41 +629,46 @@ namespace Godot return instance.Length; } - // <summary> - // Do a simple expression match, where '*' matches zero or more arbitrary characters and '?' matches any single character except '.'. - // </summary> - public static bool ExprMatch(this string instance, string expr, bool caseSensitive) + /// <summary> + /// Do a simple expression match, where '*' matches zero or more arbitrary characters and '?' matches any single character except '.'. + /// </summary> + private static bool ExprMatch(this string instance, string expr, bool caseSensitive) { - if (expr.Length == 0 || instance.Length == 0) - return false; + // case '\0': + if (expr.Length == 0) + return instance.Length == 0; switch (expr[0]) { - case '\0': - return instance[0] == 0; case '*': - return ExprMatch(expr + 1, instance, caseSensitive) || instance[0] != 0 && ExprMatch(expr, instance + 1, caseSensitive); + return ExprMatch(instance, expr.Substring(1), caseSensitive) || (instance.Length > 0 && ExprMatch(instance.Substring(1), expr, caseSensitive)); case '?': - return instance[0] != 0 && instance[0] != '.' && ExprMatch(expr + 1, instance + 1, caseSensitive); + return instance.Length > 0 && instance[0] != '.' && ExprMatch(instance.Substring(1), expr.Substring(1), caseSensitive); default: - return (caseSensitive ? instance[0] == expr[0] : char.ToUpper(instance[0]) == char.ToUpper(expr[0])) && - ExprMatch(expr + 1, instance + 1, caseSensitive); + if (instance.Length == 0) return false; + return (caseSensitive ? instance[0] == expr[0] : char.ToUpper(instance[0]) == char.ToUpper(expr[0])) && ExprMatch(instance.Substring(1), expr.Substring(1), caseSensitive); } } - // <summary> - // Do a simple case sensitive expression match, using ? and * wildcards (see [method expr_match]). - // </summary> + /// <summary> + /// Do a simple case sensitive expression match, using ? and * wildcards (see [method expr_match]). + /// </summary> public static bool Match(this string instance, string expr, bool caseSensitive = true) { + if (instance.Length == 0 || expr.Length == 0) + return false; + return instance.ExprMatch(expr, caseSensitive); } - // <summary> - // Do a simple case insensitive expression match, using ? and * wildcards (see [method expr_match]). - // </summary> + /// <summary> + /// Do a simple case insensitive expression match, using ? and * wildcards (see [method expr_match]). + /// </summary> public static bool MatchN(this string instance, string expr) { + if (instance.Length == 0 || expr.Length == 0) + return false; + return instance.ExprMatch(expr, caseSensitive: false); } diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs index 3dff37279b..d536b14eac 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs @@ -437,8 +437,11 @@ namespace Godot /// <returns>The rotated vector.</returns> public Vector2 Rotated(real_t phi) { - real_t rads = Angle() + phi; - return new Vector2(Mathf.Cos(rads), Mathf.Sin(rads)) * Length(); + real_t sine = Mathf.Sin(phi); + real_t cosi = Mathf.Cos(phi); + return new Vector2( + x * cosi - y * sine, + x * sine + y * cosi); } /// <summary> diff --git a/modules/mono/godotsharp_dirs.cpp b/modules/mono/godotsharp_dirs.cpp index 692da991c7..df31823deb 100644 --- a/modules/mono/godotsharp_dirs.cpp +++ b/modules/mono/godotsharp_dirs.cpp @@ -122,7 +122,7 @@ public: private: _GodotSharpDirs() { - res_data_dir = "res://.mono"; + res_data_dir = "res://.godot/mono"; res_metadata_dir = res_data_dir.plus_file("metadata"); res_assemblies_base_dir = res_data_dir.plus_file("assemblies"); res_assemblies_dir = res_assemblies_base_dir.plus_file(GDMono::get_expected_api_build_config()); diff --git a/modules/mono/mono_gd/gd_mono_log.cpp b/modules/mono/mono_gd/gd_mono_log.cpp index c5a988b8c3..b8ee0204c4 100644 --- a/modules/mono/mono_gd/gd_mono_log.cpp +++ b/modules/mono/mono_gd/gd_mono_log.cpp @@ -64,25 +64,32 @@ static int get_log_level_id(const char *p_log_level) { return -1; } +static String make_text(const char *log_domain, const char *log_level, const char *message) { + String text(message); + text += " (in domain "; + text += log_domain; + if (log_level) { + text += ", "; + text += log_level; + } + text += ")"; + return text; +} + void GDMonoLog::mono_log_callback(const char *log_domain, const char *log_level, const char *message, mono_bool fatal, void *) { FileAccess *f = GDMonoLog::get_singleton()->log_file; if (GDMonoLog::get_singleton()->log_level_id >= get_log_level_id(log_level)) { - String text(message); - text += " (in domain "; - text += log_domain; - if (log_level) { - text += ", "; - text += log_level; - } - text += ")\n"; + String text = make_text(log_domain, log_level, message); + text += "\n"; f->seek_end(); f->store_string(text); } if (fatal) { - ERR_PRINT("Mono: FATAL ERROR, ABORTING! Logfile: '" + GDMonoLog::get_singleton()->log_file_path + "'."); + String text = make_text(log_domain, log_level, message); + ERR_PRINT("Mono: FATAL ERROR '" + text + "', ABORTING! Logfile: '" + GDMonoLog::get_singleton()->log_file_path + "'."); // Make sure to flush before aborting f->flush(); f->close(); diff --git a/modules/mono/mono_gd/support/ios_support.mm b/modules/mono/mono_gd/support/ios_support.mm index e3d1a647fd..dc23c06eba 100644 --- a/modules/mono/mono_gd/support/ios_support.mm +++ b/modules/mono/mono_gd/support/ios_support.mm @@ -131,8 +131,7 @@ GD_PINVOKE_EXPORT void *xamarin_timezone_get_data(const char *p_name, uint32_t * NSTimeZone *tz = nil; if (p_name) { NSString *n = [[NSString alloc] initWithUTF8String:p_name]; - tz = [[[NSTimeZone alloc] initWithName:n] autorelease]; - [n release]; + tz = [[NSTimeZone alloc] initWithName:n]; } else { tz = [NSTimeZone localTimeZone]; } diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp index 36c0913f62..050dce1aab 100644 --- a/modules/pvr/texture_loader_pvr.cpp +++ b/modules/pvr/texture_loader_pvr.cpp @@ -213,10 +213,12 @@ static void _compress_pvrtc4(Image *p_img) { int ofs, size, w, h; img->get_mipmap_offset_size_and_dimensions(i, ofs, size, w, h); Javelin::RgbaBitmap bm(w, h); + void *dst = (void *)bm.GetData(); + copymem(dst, &r[ofs], size); + Javelin::ColorRgba<unsigned char> *dp = bm.GetData(); for (int j = 0; j < size / 4; j++) { - Javelin::ColorRgba<unsigned char> *dp = bm.GetData(); - /* red and Green colors are swapped. */ - new (dp) Javelin::ColorRgba<unsigned char>(r[ofs + 4 * j + 2], r[ofs + 4 * j + 1], r[ofs + 4 * j], r[ofs + 4 * j + 3]); + /* red and blue colors are swapped. */ + SWAP(dp[j].r, dp[j].b); } new_img->get_mipmap_offset_size_and_dimensions(i, ofs, size, w, h); Javelin::PvrTcEncoder::EncodeRgba4Bpp(&wr[ofs], bm); diff --git a/modules/theora/doc_classes/VideoStreamTheora.xml b/modules/theora/doc_classes/VideoStreamTheora.xml index 92244a4d28..cb8852d5ef 100644 --- a/modules/theora/doc_classes/VideoStreamTheora.xml +++ b/modules/theora/doc_classes/VideoStreamTheora.xml @@ -4,7 +4,8 @@ [VideoStream] resource for Ogg Theora videos. </brief_description> <description> - [VideoStream] resource handling the [url=https://www.theora.org/]Ogg Theora[/url] video format with [code].ogv[/code] extension. + [VideoStream] resource handling the [url=https://www.theora.org/]Ogg Theora[/url] video format with [code].ogv[/code] extension. The Theora codec is less efficient than [VideoStreamWebm]'s VP8 and VP9, but it requires less CPU resources to decode. The Theora codec is decoded on the CPU. + [b]Note:[/b] While Ogg Theora videos can also have an [code].ogg[/code] extension, you will have to rename the extension to [code].ogv[/code] to use those videos within Godot. </description> <tutorials> </tutorials> @@ -22,7 +23,7 @@ <argument index="0" name="file" type="String"> </argument> <description> - Sets the Ogg Theora video file that this [VideoStreamTheora] resource handles. The [code]file[/code] name should have the [code].o[/code] extension. + Sets the Ogg Theora video file that this [VideoStreamTheora] resource handles. The [code]file[/code] name should have the [code].ogv[/code] extension. </description> </method> </methods> diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 7c3af016b9..b1d8c05d87 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -1124,8 +1124,8 @@ void VisualScriptEditor::_update_members() { TreeItem *ti = members->create_item(variables); ti->set_text(0, E->get()); - Variant var = script->get_variable_default_value(E->get()); - ti->set_suffix(0, "= " + String(var)); + + ti->set_suffix(0, "= " + _sanitized_variant_text(E->get())); ti->set_icon(0, type_icons[script->get_variable_info(E->get()).type]); ti->set_selectable(0, true); @@ -1167,6 +1167,18 @@ void VisualScriptEditor::_update_members() { updating_members = false; } +String VisualScriptEditor::_sanitized_variant_text(const StringName &property_name) { + Variant var = script->get_variable_default_value(property_name); + + if (script->get_variable_info(property_name).type != Variant::NIL) { + Callable::CallError ce; + const Variant *converted = &var; + var = Variant::construct(script->get_variable_info(property_name).type, &converted, 1, ce, false); + } + + return String(var); +} + void VisualScriptEditor::_member_selected() { if (updating_members) { return; diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h index b5d5589250..66e435741f 100644 --- a/modules/visual_script/visual_script_editor.h +++ b/modules/visual_script/visual_script_editor.h @@ -146,6 +146,7 @@ class VisualScriptEditor : public ScriptEditorBase { bool updating_members; void _update_members(); + String _sanitized_variant_text(const StringName &property_name); StringName selected; diff --git a/modules/webm/doc_classes/VideoStreamWebm.xml b/modules/webm/doc_classes/VideoStreamWebm.xml index dfa04720cf..2edbc08cc8 100644 --- a/modules/webm/doc_classes/VideoStreamWebm.xml +++ b/modules/webm/doc_classes/VideoStreamWebm.xml @@ -4,7 +4,8 @@ [VideoStream] resource for WebM videos. </brief_description> <description> - [VideoStream] resource handling the [url=https://www.webmproject.org/]WebM[/url] video format with [code].webm[/code] extension. + [VideoStream] resource handling the [url=https://www.webmproject.org/]WebM[/url] video format with [code].webm[/code] extension. Both the VP8 and VP9 codecs are supported. The VP8 and VP9 codecs are more efficient than [VideoStreamTheora], but they require more CPU resources to decode (especially VP9). Both the VP8 and VP9 codecs are decoded on the CPU. + [b]Note:[/b] There are known bugs and performance issues with WebM video playback in Godot. If you run into problems, try using the Ogg Theora format instead: [VideoStreamTheora] </description> <tutorials> </tutorials> diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 9a144c0a78..5e6cc3e4e2 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -44,6 +44,7 @@ #include "editor/editor_log.h" #include "editor/editor_node.h" #include "editor/editor_settings.h" +#include "main/splash.gen.h" #include "platform/android/export/gradle_export_util.h" #include "platform/android/logo.gen.h" #include "platform/android/plugin/godot_plugin_config.h" @@ -200,6 +201,9 @@ static const char *android_perms[] = { nullptr }; +static const char *SPLASH_IMAGE_EXPORT_PATH = "res/drawable/splash.png"; +static const char *SPLASH_BG_COLOR_PATH = "res/drawable/splash_bg_color.png"; + struct LauncherIcon { const char *export_path; int dimensions; @@ -1433,6 +1437,18 @@ class EditorExportPlatformAndroid : public EditorExportPlatform { //printf("end\n"); } + void _load_image_data(const Ref<Image> &p_splash_image, Vector<uint8_t> &p_data) { + Vector<uint8_t> png_buffer; + Error err = PNGDriverCommon::image_to_png(p_splash_image, png_buffer); + if (err == OK) { + p_data.resize(png_buffer.size()); + memcpy(p_data.ptrw(), png_buffer.ptr(), p_data.size()); + } else { + String err_str = String("Failed to convert splash image to png."); + WARN_PRINT(err_str.utf8().get_data()); + } + } + void _process_launcher_icons(const String &p_file_name, const Ref<Image> &p_source_image, int dimension, Vector<uint8_t> &p_data) { Ref<Image> working_image = p_source_image; @@ -1452,6 +1468,35 @@ class EditorExportPlatformAndroid : public EditorExportPlatform { } } + void load_splash_refs(Ref<Image> &splash_image, Ref<Image> &splash_bg_color_image) { + // TODO: Figure out how to handle remaining boot splash parameters (e.g: fullsize, filter) + String project_splash_path = ProjectSettings::get_singleton()->get("application/boot_splash/image"); + + if (!project_splash_path.empty()) { + splash_image.instance(); + const Error err = ImageLoader::load_image(project_splash_path, splash_image); + if (err) { + splash_image.unref(); + } + } + + if (splash_image.is_null()) { + // Use the default + splash_image = Ref<Image>(memnew(Image(boot_splash_png))); + } + + // Setup the splash bg color + bool bg_color_valid; + Color bg_color = ProjectSettings::get_singleton()->get("application/boot_splash/bg_color", &bg_color_valid); + if (!bg_color_valid) { + bg_color = boot_splash_bg_color; + } + + splash_bg_color_image.instance(); + splash_bg_color_image->create(splash_image->get_width(), splash_image->get_height(), false, splash_image->get_format()); + splash_bg_color_image->fill(bg_color); + } + void load_icon_refs(const Ref<EditorExportPreset> &p_preset, Ref<Image> &icon, Ref<Image> &foreground, Ref<Image> &background) { String project_icon_path = ProjectSettings::get_singleton()->get("application/config/icon"); @@ -1479,13 +1524,34 @@ class EditorExportPlatformAndroid : public EditorExportPlatform { } void store_image(const LauncherIcon launcher_icon, const Vector<uint8_t> &data) { - String img_path = launcher_icon.export_path; - img_path = img_path.insert(0, "res://android/build/"); + store_image(launcher_icon.export_path, data); + } + + void store_image(const String &export_path, const Vector<uint8_t> &data) { + String img_path = export_path.insert(0, "res://android/build/"); store_file_at_path(img_path, data); } - void _copy_icons_to_gradle_project(const Ref<EditorExportPreset> &p_preset, const Ref<Image> &main_image, - const Ref<Image> &foreground, const Ref<Image> &background) { + void _copy_icons_to_gradle_project(const Ref<EditorExportPreset> &p_preset, + const Ref<Image> &splash_image, + const Ref<Image> &splash_bg_color_image, + const Ref<Image> &main_image, + const Ref<Image> &foreground, + const Ref<Image> &background) { + // Store the splash image + if (splash_image.is_valid() && !splash_image->empty()) { + Vector<uint8_t> data; + _load_image_data(splash_image, data); + store_image(SPLASH_IMAGE_EXPORT_PATH, data); + } + + // Store the splash bg color image + if (splash_bg_color_image.is_valid() && !splash_bg_color_image->empty()) { + Vector<uint8_t> data; + _load_image_data(splash_bg_color_image, data); + store_image(SPLASH_BG_COLOR_PATH, data); + } + // Prepare images to be resized for the icons. If some image ends up being uninitialized, // the default image from the export template will be used. @@ -2195,6 +2261,10 @@ public: bool apk_expansion = p_preset->get("apk_expansion/enable"); Vector<String> enabled_abis = get_enabled_abis(p_preset); + Ref<Image> splash_image; + Ref<Image> splash_bg_color_image; + load_splash_refs(splash_image, splash_bg_color_image); + Ref<Image> main_image; Ref<Image> foreground; Ref<Image> background; @@ -2247,7 +2317,7 @@ public: EditorNode::add_io_error("Unable to overwrite res://android/build/res/*.xml files with project name"); } // Copies the project icon files into the appropriate Gradle project directory. - _copy_icons_to_gradle_project(p_preset, main_image, foreground, background); + _copy_icons_to_gradle_project(p_preset, splash_image, splash_bg_color_image, main_image, foreground, background); // Write an AndroidManifest.xml file into the Gradle project directory. _write_tmp_manifest(p_preset, p_give_internet, p_debug); @@ -2448,6 +2518,17 @@ public: if (file == "resources.arsc") { _fix_resources(p_preset, data); } + + // Process the splash image + if (file == SPLASH_IMAGE_EXPORT_PATH && splash_image.is_valid() && !splash_image->empty()) { + _load_image_data(splash_image, data); + } + + // Process the splash bg color image + if (file == SPLASH_BG_COLOR_PATH && splash_bg_color_image.is_valid() && !splash_bg_color_image->empty()) { + _load_image_data(splash_bg_color_image, data); + } + for (int i = 0; i < icon_densities_count; ++i) { if (main_image.is_valid() && !main_image->empty()) { if (file == launcher_icons[i].export_path) { diff --git a/platform/android/java/app/AndroidManifest.xml b/platform/android/java/app/AndroidManifest.xml index 48c09552c1..e94681659c 100644 --- a/platform/android/java/app/AndroidManifest.xml +++ b/platform/android/java/app/AndroidManifest.xml @@ -38,7 +38,7 @@ <activity android:name=".GodotApp" android:label="@string/godot_project_name_string" - android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" + android:theme="@style/GodotAppSplashTheme" android:launchMode="singleTask" android:screenOrientation="landscape" android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|density|keyboard|navigation|screenLayout|uiMode" diff --git a/platform/android/java/app/res/drawable/splash.png b/platform/android/java/app/res/drawable/splash.png Binary files differnew file mode 100644 index 0000000000..7bddd4325a --- /dev/null +++ b/platform/android/java/app/res/drawable/splash.png diff --git a/platform/android/java/app/res/drawable/splash_bg_color.png b/platform/android/java/app/res/drawable/splash_bg_color.png Binary files differnew file mode 100644 index 0000000000..004b6fd508 --- /dev/null +++ b/platform/android/java/app/res/drawable/splash_bg_color.png diff --git a/platform/android/java/app/res/drawable/splash_drawable.xml b/platform/android/java/app/res/drawable/splash_drawable.xml new file mode 100644 index 0000000000..2794a40817 --- /dev/null +++ b/platform/android/java/app/res/drawable/splash_drawable.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:drawable="@drawable/splash_bg_color" /> + + <item> + <bitmap + android:gravity="center" + android:src="@drawable/splash" /> + </item> + +</layer-list> diff --git a/platform/android/java/app/res/values/themes.xml b/platform/android/java/app/res/values/themes.xml new file mode 100644 index 0000000000..26912538d3 --- /dev/null +++ b/platform/android/java/app/res/values/themes.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <style name="GodotAppMainTheme" parent="@android:style/Theme.Black.NoTitleBar.Fullscreen"/> + + <style name="GodotAppSplashTheme" parent="@style/GodotAppMainTheme"> + <item name="android:windowBackground">@drawable/splash_drawable</item> + </style> +</resources> diff --git a/platform/android/java/app/src/com/godot/game/GodotApp.java b/platform/android/java/app/src/com/godot/game/GodotApp.java index 1af5950cbe..51df70969e 100644 --- a/platform/android/java/app/src/com/godot/game/GodotApp.java +++ b/platform/android/java/app/src/com/godot/game/GodotApp.java @@ -32,9 +32,16 @@ package com.godot.game; import org.godotengine.godot.FullScreenGodotApp; +import android.os.Bundle; + /** * Template activity for Godot Android custom builds. * Feel free to extend and modify this class for your custom logic. */ public class GodotApp extends FullScreenGodotApp { + @Override + public void onCreate(Bundle savedInstanceState) { + setTheme(R.style.GodotAppMainTheme); + super.onCreate(savedInstanceState); + } } diff --git a/platform/android/java/lib/src/org/godotengine/godot/FullScreenGodotApp.java b/platform/android/java/lib/src/org/godotengine/godot/FullScreenGodotApp.java index 138c2de94c..5aa48d87da 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/FullScreenGodotApp.java +++ b/platform/android/java/lib/src/org/godotengine/godot/FullScreenGodotApp.java @@ -34,6 +34,8 @@ import android.content.Intent; import android.os.Bundle; import android.view.KeyEvent; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import androidx.fragment.app.FragmentActivity; /** @@ -43,13 +45,18 @@ import androidx.fragment.app.FragmentActivity; * within an Android app. */ public abstract class FullScreenGodotApp extends FragmentActivity { - protected Godot godotFragment; + @Nullable + private Godot godotFragment; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.godot_app_layout); - godotFragment = new Godot(); + godotFragment = initGodotInstance(); + if (godotFragment == null) { + throw new IllegalStateException("Godot instance must be non-null."); + } + getSupportFragmentManager().beginTransaction().replace(R.id.godot_fragment_container, godotFragment).setPrimaryNavigationFragment(godotFragment).commitNowAllowingStateLoss(); } @@ -76,4 +83,17 @@ public abstract class FullScreenGodotApp extends FragmentActivity { } return super.onKeyMultiple(inKeyCode, repeatCount, event); } + + /** + * Used to initialize the Godot fragment instance in {@link FullScreenGodotApp#onCreate(Bundle)}. + */ + @NonNull + protected Godot initGodotInstance() { + return new Godot(); + } + + @Nullable + protected final Godot getGodotFragment() { + return godotFragment; + } } diff --git a/platform/iphone/SCsub b/platform/iphone/SCsub index 49c77468ed..1dd37dabe5 100644 --- a/platform/iphone/SCsub +++ b/platform/iphone/SCsub @@ -18,7 +18,9 @@ iphone_lib = [ "godot_view.mm", "display_layer.mm", "godot_view_renderer.mm", - "godot_view_gesture_recognizer.m", + "godot_view_gesture_recognizer.mm", + "device_metrics.m", + "native_video_view.m", ] env_ios = env.Clone() diff --git a/platform/iphone/app_delegate.mm b/platform/iphone/app_delegate.mm index 7edbcc4667..40a63d7ad2 100644 --- a/platform/iphone/app_delegate.mm +++ b/platform/iphone/app_delegate.mm @@ -62,7 +62,7 @@ static ViewController *mainViewController = nil; CGRect windowBounds = [[UIScreen mainScreen] bounds]; // Create a full-screen window - self.window = [[[UIWindow alloc] initWithFrame:windowBounds] autorelease]; + self.window = [[UIWindow alloc] initWithFrame:windowBounds]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; @@ -140,7 +140,6 @@ static ViewController *mainViewController = nil; - (void)dealloc { self.window = nil; - [super dealloc]; } @end diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py index 66579c1ad7..5ebabdd3dc 100644 --- a/platform/iphone/detect.py +++ b/platform/iphone/detect.py @@ -129,7 +129,7 @@ def configure(env): detect_darwin_sdk_path("iphone", env) env.Append( CCFLAGS=( - "-fno-objc-arc -arch armv7 -fmessage-length=0 -fno-strict-aliasing" + "-fobjc-arc -arch armv7 -fmessage-length=0 -fno-strict-aliasing" " -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits" " -fpascal-strings -fblocks -isysroot $IPHONESDK -fvisibility=hidden -mthumb" ' "-DIBOutlet=__attribute__((iboutlet))"' @@ -141,7 +141,7 @@ def configure(env): detect_darwin_sdk_path("iphone", env) env.Append( CCFLAGS=( - "-fno-objc-arc -arch arm64 -fmessage-length=0 -fno-strict-aliasing" + "-fobjc-arc -arch arm64 -fmessage-length=0 -fno-strict-aliasing" " -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits" " -fpascal-strings -fblocks -fvisibility=hidden -MMD -MT dependencies -miphoneos-version-min=11.0" " -isysroot $IPHONESDK".split() diff --git a/platform/iphone/device_metrics.h b/platform/iphone/device_metrics.h new file mode 100644 index 0000000000..6d0ff49077 --- /dev/null +++ b/platform/iphone/device_metrics.h @@ -0,0 +1,37 @@ +/*************************************************************************/ +/* device_metrics.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#import <Foundation/Foundation.h> + +@interface GodotDeviceMetrics : NSObject + +@property(nonatomic, class, readonly, strong) NSDictionary<NSArray *, NSNumber *> *dpiList; + +@end diff --git a/platform/iphone/device_metrics.m b/platform/iphone/device_metrics.m new file mode 100644 index 0000000000..747872bc49 --- /dev/null +++ b/platform/iphone/device_metrics.m @@ -0,0 +1,152 @@ +/*************************************************************************/ +/* device_metrics.m */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#import "device_metrics.h" + +@implementation GodotDeviceMetrics + ++ (NSDictionary *)dpiList { + return @{ + @[ + @"iPad1,1", + @"iPad2,1", + @"iPad2,2", + @"iPad2,3", + @"iPad2,4", + ] : @132, + @[ + @"iPhone1,1", + @"iPhone1,2", + @"iPhone2,1", + @"iPad2,5", + @"iPad2,6", + @"iPad2,7", + @"iPod1,1", + @"iPod2,1", + @"iPod3,1", + ] : @163, + @[ + @"iPad3,1", + @"iPad3,2", + @"iPad3,3", + @"iPad3,4", + @"iPad3,5", + @"iPad3,6", + @"iPad4,1", + @"iPad4,2", + @"iPad4,3", + @"iPad5,3", + @"iPad5,4", + @"iPad6,3", + @"iPad6,4", + @"iPad6,7", + @"iPad6,8", + @"iPad6,11", + @"iPad6,12", + @"iPad7,1", + @"iPad7,2", + @"iPad7,3", + @"iPad7,4", + @"iPad7,5", + @"iPad7,6", + @"iPad7,11", + @"iPad7,12", + @"iPad8,1", + @"iPad8,2", + @"iPad8,3", + @"iPad8,4", + @"iPad8,5", + @"iPad8,6", + @"iPad8,7", + @"iPad8,8", + @"iPad8,9", + @"iPad8,10", + @"iPad8,11", + @"iPad8,12", + @"iPad11,3", + @"iPad11,4", + ] : @264, + @[ + @"iPhone3,1", + @"iPhone3,2", + @"iPhone3,3", + @"iPhone4,1", + @"iPhone5,1", + @"iPhone5,2", + @"iPhone5,3", + @"iPhone5,4", + @"iPhone6,1", + @"iPhone6,2", + @"iPhone7,2", + @"iPhone8,1", + @"iPhone8,4", + @"iPhone9,1", + @"iPhone9,3", + @"iPhone10,1", + @"iPhone10,4", + @"iPhone11,8", + @"iPhone12,1", + @"iPhone12,8", + @"iPad4,4", + @"iPad4,5", + @"iPad4,6", + @"iPad4,7", + @"iPad4,8", + @"iPad4,9", + @"iPad5,1", + @"iPad5,2", + @"iPad11,1", + @"iPad11,2", + @"iPod4,1", + @"iPod5,1", + @"iPod7,1", + @"iPod9,1", + ] : @326, + @[ + @"iPhone7,1", + @"iPhone8,2", + @"iPhone9,2", + @"iPhone9,4", + @"iPhone10,2", + @"iPhone10,5", + ] : @401, + @[ + @"iPhone10,3", + @"iPhone10,6", + @"iPhone11,2", + @"iPhone11,4", + @"iPhone11,6", + @"iPhone12,3", + @"iPhone12,5", + ] : @458, + }; +} + +@end diff --git a/platform/iphone/display_layer.mm b/platform/iphone/display_layer.mm index 5ec94fb471..2716538b89 100644 --- a/platform/iphone/display_layer.mm +++ b/platform/iphone/display_layer.mm @@ -124,11 +124,8 @@ } if (context) { - [context release]; context = nil; } - - [super dealloc]; } - (BOOL)createFramebuffer { diff --git a/platform/iphone/display_server_iphone.mm b/platform/iphone/display_server_iphone.mm index eea87cecc9..d456f9cbf6 100644 --- a/platform/iphone/display_server_iphone.mm +++ b/platform/iphone/display_server_iphone.mm @@ -32,8 +32,10 @@ #import "app_delegate.h" #include "core/io/file_access_pack.h" #include "core/project_settings.h" +#import "device_metrics.h" #import "godot_view.h" #include "ios.h" +#import "native_video_view.h" #include "os_iphone.h" #import "view_controller.h" @@ -41,120 +43,6 @@ #import <sys/utsname.h> static const float kDisplayServerIPhoneAcceleration = 1; -static NSDictionary *iOSModelToDPI = @{ - @[ - @"iPad1,1", - @"iPad2,1", - @"iPad2,2", - @"iPad2,3", - @"iPad2,4", - ] : @132, - @[ - @"iPhone1,1", - @"iPhone1,2", - @"iPhone2,1", - @"iPad2,5", - @"iPad2,6", - @"iPad2,7", - @"iPod1,1", - @"iPod2,1", - @"iPod3,1", - ] : @163, - @[ - @"iPad3,1", - @"iPad3,2", - @"iPad3,3", - @"iPad3,4", - @"iPad3,5", - @"iPad3,6", - @"iPad4,1", - @"iPad4,2", - @"iPad4,3", - @"iPad5,3", - @"iPad5,4", - @"iPad6,3", - @"iPad6,4", - @"iPad6,7", - @"iPad6,8", - @"iPad6,11", - @"iPad6,12", - @"iPad7,1", - @"iPad7,2", - @"iPad7,3", - @"iPad7,4", - @"iPad7,5", - @"iPad7,6", - @"iPad7,11", - @"iPad7,12", - @"iPad8,1", - @"iPad8,2", - @"iPad8,3", - @"iPad8,4", - @"iPad8,5", - @"iPad8,6", - @"iPad8,7", - @"iPad8,8", - @"iPad8,9", - @"iPad8,10", - @"iPad8,11", - @"iPad8,12", - @"iPad11,3", - @"iPad11,4", - ] : @264, - @[ - @"iPhone3,1", - @"iPhone3,2", - @"iPhone3,3", - @"iPhone4,1", - @"iPhone5,1", - @"iPhone5,2", - @"iPhone5,3", - @"iPhone5,4", - @"iPhone6,1", - @"iPhone6,2", - @"iPhone7,2", - @"iPhone8,1", - @"iPhone8,4", - @"iPhone9,1", - @"iPhone9,3", - @"iPhone10,1", - @"iPhone10,4", - @"iPhone11,8", - @"iPhone12,1", - @"iPhone12,8", - @"iPad4,4", - @"iPad4,5", - @"iPad4,6", - @"iPad4,7", - @"iPad4,8", - @"iPad4,9", - @"iPad5,1", - @"iPad5,2", - @"iPad11,1", - @"iPad11,2", - @"iPod4,1", - @"iPod5,1", - @"iPod7,1", - @"iPod9,1", - ] : @326, - @[ - @"iPhone7,1", - @"iPhone8,2", - @"iPhone9,2", - @"iPhone9,4", - @"iPhone10,2", - @"iPhone10,5", - ] : @401, - @[ - @"iPhone10,3", - @"iPhone10,6", - @"iPhone11,2", - @"iPhone11,4", - @"iPhone11,6", - @"iPhone12,3", - @"iPhone12,5", - ] : @458, -}; DisplayServerIPhone *DisplayServerIPhone::get_singleton() { return (DisplayServerIPhone *)DisplayServer::get_singleton(); @@ -383,8 +271,7 @@ void DisplayServerIPhone::update_gravity(float p_x, float p_y, float p_z) { Input::get_singleton()->set_gravity(Vector3(p_x, p_y, p_z)); }; -void DisplayServerIPhone::update_accelerometer(float p_x, float p_y, - float p_z) { +void DisplayServerIPhone::update_accelerometer(float p_x, float p_y, float p_z) { // Found out the Z should not be negated! Pass as is! Vector3 v_accelerometer = Vector3( p_x / kDisplayServerIPhoneAcceleration, @@ -392,39 +279,6 @@ void DisplayServerIPhone::update_accelerometer(float p_x, float p_y, p_z / kDisplayServerIPhoneAcceleration); Input::get_singleton()->set_accelerometer(v_accelerometer); - - /* - if (p_x != last_accel.x) { - //printf("updating accel x %f\n", p_x); - InputEvent ev; - ev.type = InputEvent::JOYPAD_MOTION; - ev.device = 0; - ev.joy_motion.axis = JOY_ANALOG_0; - ev.joy_motion.axis_value = (p_x / (float)ACCEL_RANGE); - last_accel.x = p_x; - queue_event(ev); - }; - if (p_y != last_accel.y) { - //printf("updating accel y %f\n", p_y); - InputEvent ev; - ev.type = InputEvent::JOYPAD_MOTION; - ev.device = 0; - ev.joy_motion.axis = JOY_ANALOG_1; - ev.joy_motion.axis_value = (p_y / (float)ACCEL_RANGE); - last_accel.y = p_y; - queue_event(ev); - }; - if (p_z != last_accel.z) { - //printf("updating accel z %f\n", p_z); - InputEvent ev; - ev.type = InputEvent::JOYPAD_MOTION; - ev.device = 0; - ev.joy_motion.axis = JOY_ANALOG_2; - ev.joy_motion.axis_value = ( (1.0 - p_z) / (float)ACCEL_RANGE); - last_accel.z = p_z; - queue_event(ev); - }; - */ }; void DisplayServerIPhone::update_magnetometer(float p_x, float p_y, float p_z) { @@ -516,6 +370,8 @@ int DisplayServerIPhone::screen_get_dpi(int p_screen) const { NSString *string = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; + NSDictionary *iOSModelToDPI = [GodotDeviceMetrics dpiList]; + for (NSArray *keyArray in iOSModelToDPI) { if ([keyArray containsObject:string]) { NSNumber *value = iOSModelToDPI[keyArray]; @@ -523,7 +379,26 @@ int DisplayServerIPhone::screen_get_dpi(int p_screen) const { } } - return 163; + // If device wasn't found in dictionary + // make a best guess from device metrics. + CGFloat scale = [UIScreen mainScreen].scale; + + UIUserInterfaceIdiom idiom = [UIDevice currentDevice].userInterfaceIdiom; + + switch (idiom) { + case UIUserInterfaceIdiomPad: + return scale == 2 ? 264 : 132; + case UIUserInterfaceIdiomPhone: { + if (scale == 3) { + CGFloat nativeScale = [UIScreen mainScreen].nativeScale; + return nativeScale == 3 ? 458 : 401; + } + + return 326; + } + default: + return 72; + } } float DisplayServerIPhone::screen_get_scale(int p_screen) const { @@ -716,7 +591,7 @@ Error DisplayServerIPhone::native_video_play(String p_path, float p_volume, Stri String file_path = ProjectSettings::get_singleton()->globalize_path(p_path); - NSString *filePath = [[[NSString alloc] initWithUTF8String:file_path.utf8().get_data()] autorelease]; + NSString *filePath = [[NSString alloc] initWithUTF8String:file_path.utf8().get_data()]; NSString *audioTrack = [NSString stringWithUTF8String:p_audio_track.utf8()]; NSString *subtitleTrack = [NSString stringWithUTF8String:p_subtitle_track.utf8()]; @@ -731,22 +606,22 @@ Error DisplayServerIPhone::native_video_play(String p_path, float p_volume, Stri } bool DisplayServerIPhone::native_video_is_playing() const { - return [AppDelegate.viewController isVideoPlaying]; + return [AppDelegate.viewController.videoView isVideoPlaying]; } void DisplayServerIPhone::native_video_pause() { if (native_video_is_playing()) { - [AppDelegate.viewController pauseVideo]; + [AppDelegate.viewController.videoView pauseVideo]; } } void DisplayServerIPhone::native_video_unpause() { - [AppDelegate.viewController unpauseVideo]; + [AppDelegate.viewController.videoView unpauseVideo]; }; void DisplayServerIPhone::native_video_stop() { if (native_video_is_playing()) { - [AppDelegate.viewController stopVideo]; + [AppDelegate.viewController.videoView stopVideo]; } } diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp index 97f954ebb2..19f7c8e482 100644 --- a/platform/iphone/export/export.cpp +++ b/platform/iphone/export/export.cpp @@ -160,9 +160,8 @@ public: void EditorExportPlatformIOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) { String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name"); - if (driver == "GLES2") { - r_features->push_back("etc"); - } else if (driver == "Vulkan") { + r_features->push_back("pvrtc"); + if (driver == "Vulkan") { // FIXME: Review if this is correct. r_features->push_back("etc2"); } @@ -1649,7 +1648,7 @@ bool EditorExportPlatformIOS::can_export(const Ref<EditorExportPreset> &p_preset } } - String etc_error = test_etc2(); + String etc_error = test_etc2_or_pvrtc(); if (etc_error != String()) { valid = false; err += etc_error; diff --git a/platform/iphone/game_center.h b/platform/iphone/game_center.h index 1e9a68fe48..6705674ac6 100644 --- a/platform/iphone/game_center.h +++ b/platform/iphone/game_center.h @@ -48,7 +48,7 @@ class GameCenter : public Object { void return_connect_error(const char *p_error_description); public: - void connect(); + Error authenticate(); bool is_authenticated(); Error post_score(Dictionary p_score); diff --git a/platform/iphone/game_center.mm b/platform/iphone/game_center.mm index 4481775c32..0f8c0100c3 100644 --- a/platform/iphone/game_center.mm +++ b/platform/iphone/game_center.mm @@ -52,6 +52,7 @@ extern "C" { GameCenter *GameCenter::instance = NULL; void GameCenter::_bind_methods() { + ClassDB::bind_method(D_METHOD("authenticate"), &GameCenter::authenticate); ClassDB::bind_method(D_METHOD("is_authenticated"), &GameCenter::is_authenticated); ClassDB::bind_method(D_METHOD("post_score"), &GameCenter::post_score); @@ -66,40 +67,28 @@ void GameCenter::_bind_methods() { ClassDB::bind_method(D_METHOD("pop_pending_event"), &GameCenter::pop_pending_event); }; -void GameCenter::return_connect_error(const char *p_error_description) { - authenticated = false; - Dictionary ret; - ret["type"] = "authentication"; - ret["result"] = "error"; - ret["error_code"] = 0; - ret["error_description"] = p_error_description; - pending_events.push_back(ret); -} - -void GameCenter::connect() { +Error GameCenter::authenticate() { //if this class isn't available, game center isn't implemented if ((NSClassFromString(@"GKLocalPlayer")) == nil) { - return_connect_error("GameCenter not available"); - return; + return ERR_UNAVAILABLE; } GKLocalPlayer *player = [GKLocalPlayer localPlayer]; - if (![player respondsToSelector:@selector(authenticateHandler)]) { - return_connect_error("GameCenter doesn't respond to 'authenticateHandler'"); - return; - } + ERR_FAIL_COND_V(![player respondsToSelector:@selector(authenticateHandler)], ERR_UNAVAILABLE); ViewController *root_controller = (ViewController *)((AppDelegate *)[[UIApplication sharedApplication] delegate]).window.rootViewController; - if (!root_controller) { - return_connect_error("Window doesn't have root ViewController"); - return; - } + ERR_FAIL_COND_V(!root_controller, FAILED); // This handler is called several times. First when the view needs to be shown, then again // after the view is cancelled or the user logs in. Or if the user's already logged in, it's // called just once to confirm they're authenticated. This is why no result needs to be specified // in the presentViewController phase. In this case, more calls to this function will follow. + _weakify(root_controller); + _weakify(player); player.authenticateHandler = (^(UIViewController *controller, NSError *error) { + _strongify(root_controller); + _strongify(player); + if (controller) { [root_controller presentViewController:controller animated:YES completion:nil]; } else { @@ -126,6 +115,8 @@ void GameCenter::connect() { pending_events.push_back(ret); }; }); + + return OK; }; bool GameCenter::is_authenticated() { @@ -137,8 +128,8 @@ Error GameCenter::post_score(Dictionary p_score) { float score = p_score["score"]; String category = p_score["category"]; - NSString *cat_str = [[[NSString alloc] initWithUTF8String:category.utf8().get_data()] autorelease]; - GKScore *reporter = [[[GKScore alloc] initWithLeaderboardIdentifier:cat_str] autorelease]; + NSString *cat_str = [[NSString alloc] initWithUTF8String:category.utf8().get_data()]; + GKScore *reporter = [[GKScore alloc] initWithLeaderboardIdentifier:cat_str]; reporter.value = score; ERR_FAIL_COND_V([GKScore respondsToSelector:@selector(reportScores)], ERR_UNAVAILABLE); @@ -166,8 +157,8 @@ Error GameCenter::award_achievement(Dictionary p_params) { String name = p_params["name"]; float progress = p_params["progress"]; - NSString *name_str = [[[NSString alloc] initWithUTF8String:name.utf8().get_data()] autorelease]; - GKAchievement *achievement = [[[GKAchievement alloc] initWithIdentifier:name_str] autorelease]; + NSString *name_str = [[NSString alloc] initWithUTF8String:name.utf8().get_data()]; + GKAchievement *achievement = [[GKAchievement alloc] initWithIdentifier:name_str]; ERR_FAIL_COND_V(!achievement, FAILED); ERR_FAIL_COND_V([GKAchievement respondsToSelector:@selector(reportAchievements)], ERR_UNAVAILABLE); @@ -311,7 +302,7 @@ Error GameCenter::show_game_center(Dictionary p_params) { } } - GKGameCenterViewController *controller = [[[GKGameCenterViewController alloc] init] autorelease]; + GKGameCenterViewController *controller = [[GKGameCenterViewController alloc] init]; ERR_FAIL_COND_V(!controller, FAILED); ViewController *root_controller = (ViewController *)((AppDelegate *)[[UIApplication sharedApplication] delegate]).window.rootViewController; @@ -323,7 +314,7 @@ Error GameCenter::show_game_center(Dictionary p_params) { controller.leaderboardIdentifier = nil; if (p_params.has("leaderboard_name")) { String name = p_params["leaderboard_name"]; - NSString *name_str = [[[NSString alloc] initWithUTF8String:name.utf8().get_data()] autorelease]; + NSString *name_str = [[NSString alloc] initWithUTF8String:name.utf8().get_data()]; controller.leaderboardIdentifier = name_str; } } diff --git a/platform/iphone/godot_iphone.mm b/platform/iphone/godot_iphone.mm index 090b772947..6d95276f37 100644 --- a/platform/iphone/godot_iphone.mm +++ b/platform/iphone/godot_iphone.mm @@ -49,10 +49,8 @@ int add_path(int p_argc, char **p_args) { } p_args[p_argc++] = (char *)"--path"; - [str retain]; // memory leak lol (maybe make it static here and delete it in ViewController destructor? @todo p_args[p_argc++] = (char *)[str cStringUsingEncoding:NSUTF8StringEncoding]; p_args[p_argc] = NULL; - [str release]; return p_argc; }; @@ -68,9 +66,7 @@ int add_cmdline(int p_argc, char **p_args) { if (!str) { continue; } - [str retain]; // @todo delete these at some point p_args[p_argc++] = (char *)[str cStringUsingEncoding:NSUTF8StringEncoding]; - [str release]; }; p_args[p_argc] = NULL; diff --git a/platform/iphone/godot_view.mm b/platform/iphone/godot_view.mm index c0a31549c4..3b4344c46d 100644 --- a/platform/iphone/godot_view.mm +++ b/platform/iphone/godot_view.mm @@ -145,8 +145,6 @@ static const int max_touches = 8; if (self.delayGestureRecognizer) { self.delayGestureRecognizer = nil; } - - [super dealloc]; } - (void)godot_commonInit { @@ -156,7 +154,7 @@ static const int max_touches = 8; // Configure and start accelerometer if (!self.motionManager) { - self.motionManager = [[[CMMotionManager alloc] init] autorelease]; + self.motionManager = [[CMMotionManager alloc] init]; if (self.motionManager.deviceMotionAvailable) { self.motionManager.deviceMotionUpdateInterval = 1.0 / 70.0; [self.motionManager startDeviceMotionUpdatesUsingReferenceFrame:CMAttitudeReferenceFrameXMagneticNorthZVertical]; @@ -169,7 +167,6 @@ static const int max_touches = 8; GodotViewGestureRecognizer *gestureRecognizer = [[GodotViewGestureRecognizer alloc] init]; self.delayGestureRecognizer = gestureRecognizer; [self addGestureRecognizer:self.delayGestureRecognizer]; - [gestureRecognizer release]; } - (void)stopRendering { @@ -204,14 +201,11 @@ static const int max_touches = 8; if (self.useCADisplayLink) { self.displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(drawView)]; - // if (@available(iOS 10, *)) { - self.displayLink.preferredFramesPerSecond = (NSInteger)(1.0 / self.renderingInterval); - // } else { - // // Approximate frame rate - // // assumes device refreshes at 60 fps - // int frameInterval = (int)floor(self.renderingInterval * 60.0f); - // [self.displayLink setFrameInterval:frameInterval]; - // } + // Approximate frame rate + // assumes device refreshes at 60 fps + int displayFPS = (NSInteger)(1.0 / self.renderingInterval); + + self.displayLink.preferredFramesPerSecond = displayFPS; // Setup DisplayLink in main thread [self.displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; diff --git a/platform/iphone/godot_view_gesture_recognizer.h b/platform/iphone/godot_view_gesture_recognizer.h index ca3bd808d1..1431a9fb89 100644 --- a/platform/iphone/godot_view_gesture_recognizer.h +++ b/platform/iphone/godot_view_gesture_recognizer.h @@ -32,13 +32,15 @@ // emulating UIScrollView's UIScrollViewDelayedTouchesBeganGestureRecognizer. // It catches all gestures incoming to UIView and delays them for 150ms // (the same value used by UIScrollViewDelayedTouchesBeganGestureRecognizer) -// If touch cancelation or end message is fired it fires delayed +// If touch cancellation or end message is fired it fires delayed // begin touch immediately as well as last touch signal #import <UIKit/UIKit.h> @interface GodotViewGestureRecognizer : UIGestureRecognizer +@property(nonatomic, readonly, assign) NSTimeInterval delayTimeInterval; + - (instancetype)init; @end diff --git a/platform/iphone/godot_view_gesture_recognizer.m b/platform/iphone/godot_view_gesture_recognizer.mm index 377ccd52a5..71367a629c 100644 --- a/platform/iphone/godot_view_gesture_recognizer.m +++ b/platform/iphone/godot_view_gesture_recognizer.mm @@ -1,5 +1,5 @@ /*************************************************************************/ -/* godot_view_gesture_recognizer.m */ +/* godot_view_gesture_recognizer.mm */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -30,8 +30,7 @@ #import "godot_view_gesture_recognizer.h" -// Using same delay interval that is used for `UIScrollView` -const NSTimeInterval kGLGestureDelayInterval = 0.150; +#include "core/project_settings.h" // Minimum distance for touches to move to fire // a delay timer before scheduled time. @@ -41,6 +40,12 @@ const CGFloat kGLGestureMovementDistance = 0.5; @interface GodotViewGestureRecognizer () +@property(nonatomic, readwrite, assign) NSTimeInterval delayTimeInterval; + +@end + +@interface GodotViewGestureRecognizer () + // Timer used to delay begin touch message. // Should work as simple emulation of UIDelayedAction @property(strong, nonatomic) NSTimer *delayTimer; @@ -60,6 +65,8 @@ const CGFloat kGLGestureMovementDistance = 0.5; self.delaysTouchesBegan = YES; self.delaysTouchesEnded = YES; + self.delayTimeInterval = GLOBAL_GET("input_devices/pointing/ios/touch_delay"); + return self; } @@ -76,8 +83,6 @@ const CGFloat kGLGestureMovementDistance = 0.5; if (self.delayedEvent) { self.delayedEvent = nil; } - - [super dealloc]; } - (void)delayTouches:(NSSet *)touches andEvent:(UIEvent *)event { @@ -87,7 +92,7 @@ const CGFloat kGLGestureMovementDistance = 0.5; self.delayedEvent = event; self.delayTimer = [NSTimer - scheduledTimerWithTimeInterval:kGLGestureDelayInterval + scheduledTimerWithTimeInterval:self.delayTimeInterval target:self selector:@selector(fireDelayedTouches:) userInfo:nil @@ -109,7 +114,6 @@ const CGFloat kGLGestureMovementDistance = 0.5; - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { NSSet *cleared = [self copyClearedTouches:touches phase:UITouchPhaseBegan]; [self delayTouches:cleared andEvent:event]; - [cleared release]; } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { @@ -130,17 +134,14 @@ const CGFloat kGLGestureMovementDistance = 0.5; if (distance > kGLGestureMovementDistance) { [self.delayTimer fire]; [self.view touchesMoved:cleared withEvent:event]; - [cleared release]; return; } } - [cleared release]; return; } [self.view touchesMoved:cleared withEvent:event]; - [cleared release]; } - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { @@ -148,7 +149,6 @@ const CGFloat kGLGestureMovementDistance = 0.5; NSSet *cleared = [self copyClearedTouches:touches phase:UITouchPhaseEnded]; [self.view touchesEnded:cleared withEvent:event]; - [cleared release]; } - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { diff --git a/platform/iphone/icloud.mm b/platform/iphone/icloud.mm index d3086e6cea..3d81349883 100644 --- a/platform/iphone/icloud.mm +++ b/platform/iphone/icloud.mm @@ -150,7 +150,7 @@ Variant nsobject_to_variant(NSObject *object) { NSObject *variant_to_nsobject(Variant v) { if (v.get_type() == Variant::STRING) { - return [[[NSString alloc] initWithUTF8String:((String)v).utf8().get_data()] autorelease]; + return [[NSString alloc] initWithUTF8String:((String)v).utf8().get_data()]; } else if (v.get_type() == Variant::FLOAT) { return [NSNumber numberWithDouble:(double)v]; } else if (v.get_type() == Variant::INT) { @@ -158,11 +158,11 @@ NSObject *variant_to_nsobject(Variant v) { } else if (v.get_type() == Variant::BOOL) { return [NSNumber numberWithBool:BOOL((bool)v)]; } else if (v.get_type() == Variant::DICTIONARY) { - NSMutableDictionary *result = [[[NSMutableDictionary alloc] init] autorelease]; + NSMutableDictionary *result = [[NSMutableDictionary alloc] init]; Dictionary dic = v; Array keys = dic.keys(); for (int i = 0; i < keys.size(); ++i) { - NSString *key = [[[NSString alloc] initWithUTF8String:((String)(keys[i])).utf8().get_data()] autorelease]; + NSString *key = [[NSString alloc] initWithUTF8String:((String)(keys[i])).utf8().get_data()]; NSObject *value = variant_to_nsobject(dic[keys[i]]); if (key == NULL || value == NULL) { @@ -173,7 +173,7 @@ NSObject *variant_to_nsobject(Variant v) { } return result; } else if (v.get_type() == Variant::ARRAY) { - NSMutableArray *result = [[[NSMutableArray alloc] init] autorelease]; + NSMutableArray *result = [[NSMutableArray alloc] init]; Array arr = v; for (int i = 0; i < arr.size(); ++i) { NSObject *value = variant_to_nsobject(arr[i]); @@ -195,7 +195,7 @@ NSObject *variant_to_nsobject(Variant v) { } Error ICloud::remove_key(String p_param) { - NSString *key = [[[NSString alloc] initWithUTF8String:p_param.utf8().get_data()] autorelease]; + NSString *key = [[NSString alloc] initWithUTF8String:p_param.utf8().get_data()]; NSUbiquitousKeyValueStore *store = [NSUbiquitousKeyValueStore defaultStore]; @@ -217,7 +217,7 @@ Array ICloud::set_key_values(Dictionary p_params) { String variant_key = keys[i]; Variant variant_value = p_params[variant_key]; - NSString *key = [[[NSString alloc] initWithUTF8String:variant_key.utf8().get_data()] autorelease]; + NSString *key = [[NSString alloc] initWithUTF8String:variant_key.utf8().get_data()]; if (key == NULL) { error_keys.push_back(variant_key); continue; @@ -238,7 +238,7 @@ Array ICloud::set_key_values(Dictionary p_params) { } Variant ICloud::get_key_value(String p_param) { - NSString *key = [[[NSString alloc] initWithUTF8String:p_param.utf8().get_data()] autorelease]; + NSString *key = [[NSString alloc] initWithUTF8String:p_param.utf8().get_data()]; NSUbiquitousKeyValueStore *store = [NSUbiquitousKeyValueStore defaultStore]; if (![[store dictionaryRepresentation] objectForKey:key]) { diff --git a/platform/iphone/in_app_store.mm b/platform/iphone/in_app_store.mm index 1477f92200..2b973dfbcf 100644 --- a/platform/iphone/in_app_store.mm +++ b/platform/iphone/in_app_store.mm @@ -56,7 +56,6 @@ static NSArray *latestProducts; [numberFormatter setNumberStyle:NSNumberFormatterCurrencyStyle]; [numberFormatter setLocale:self.priceLocale]; NSString *formattedString = [numberFormatter stringFromNumber:self.price]; - [numberFormatter release]; return formattedString; } @@ -124,8 +123,6 @@ void InAppStore::_bind_methods() { ret["invalid_ids"] = invalid_ids; InAppStore::get_singleton()->_post_event(ret); - - [request release]; }; @end @@ -136,14 +133,14 @@ Error InAppStore::request_product_info(Dictionary p_params) { PackedStringArray pids = p_params["product_ids"]; printf("************ request product info! %i\n", pids.size()); - NSMutableArray *array = [[[NSMutableArray alloc] initWithCapacity:pids.size()] autorelease]; + NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:pids.size()]; for (int i = 0; i < pids.size(); i++) { printf("******** adding %s to product list\n", pids[i].utf8().get_data()); - NSString *pid = [[[NSString alloc] initWithUTF8String:pids[i].utf8().get_data()] autorelease]; + NSString *pid = [[NSString alloc] initWithUTF8String:pids[i].utf8().get_data()]; [array addObject:pid]; }; - NSSet *products = [[[NSSet alloc] initWithArray:array] autorelease]; + NSSet *products = [[NSSet alloc] initWithArray:array]; SKProductsRequest *request = [[SKProductsRequest alloc] initWithProductIdentifiers:products]; ProductsDelegate *delegate = [[ProductsDelegate alloc] init]; @@ -183,30 +180,14 @@ Error InAppStore::restore_purchases() { ret["transaction_id"] = transactionId; NSData *receipt = nil; - int sdk_version = 6; - - if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) { - NSURL *receiptFileURL = nil; - NSBundle *bundle = [NSBundle mainBundle]; - if ([bundle respondsToSelector:@selector(appStoreReceiptURL)]) { - // Get the transaction receipt file path location in the app bundle. - receiptFileURL = [bundle appStoreReceiptURL]; - - // Read in the contents of the transaction file. - receipt = [NSData dataWithContentsOfURL:receiptFileURL]; - sdk_version = 7; + int sdk_version = [[[UIDevice currentDevice] systemVersion] intValue]; - } else { - // Fall back to deprecated transaction receipt, - // which is still available in iOS 7. + NSBundle *bundle = [NSBundle mainBundle]; + // Get the transaction receipt file path location in the app bundle. + NSURL *receiptFileURL = [bundle appStoreReceiptURL]; - // Use SKPaymentTransaction's transactionReceipt. - receipt = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] appStoreReceiptURL]]; - } - - } else { - receipt = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] appStoreReceiptURL]]; - } + // Read in the contents of the transaction file. + receipt = [NSData dataWithContentsOfURL:receiptFileURL]; NSString *receipt_to_send = nil; if (receipt != nil) { @@ -265,7 +246,7 @@ Error InAppStore::purchase(Dictionary p_params) { printf("purchasing!\n"); ERR_FAIL_COND_V(!p_params.has("product_id"), ERR_INVALID_PARAMETER); - NSString *pid = [[[NSString alloc] initWithUTF8String:String(p_params["product_id"]).utf8().get_data()] autorelease]; + NSString *pid = [[NSString alloc] initWithUTF8String:String(p_params["product_id"]).utf8().get_data()]; SKProduct *product = nil; @@ -307,7 +288,7 @@ void InAppStore::_post_event(Variant p_event) { void InAppStore::_record_purchase(String product_id) { String skey = "purchased/" + product_id; - NSString *key = [[[NSString alloc] initWithUTF8String:skey.utf8().get_data()] autorelease]; + NSString *key = [[NSString alloc] initWithUTF8String:skey.utf8().get_data()]; [[NSUserDefaults standardUserDefaults] setBool:YES forKey:key]; [[NSUserDefaults standardUserDefaults] synchronize]; }; diff --git a/platform/iphone/ios.mm b/platform/iphone/ios.mm index 6d7699c0c9..d4e099063f 100644 --- a/platform/iphone/ios.mm +++ b/platform/iphone/ios.mm @@ -30,6 +30,7 @@ #include "ios.h" #import "app_delegate.h" +#import "view_controller.h" #import <UIKit/UIKit.h> #include <sys/sysctl.h> @@ -68,23 +69,9 @@ String iOS::get_model() const { } String iOS::get_rate_url(int p_app_id) const { - String templ = "itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=APP_ID"; - String templ_iOS7 = "itms-apps://itunes.apple.com/app/idAPP_ID"; - String templ_iOS8 = "itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=APP_ID&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software"; + String app_url_path = "itms-apps://itunes.apple.com/app/idAPP_ID"; - //ios7 before - String ret = templ; - - if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0 && [[[UIDevice currentDevice] systemVersion] floatValue] < 7.1) { - // iOS 7 needs a different templateReviewURL @see https://github.com/arashpayan/appirater/issues/131 - ret = templ_iOS7; - } else if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) { - // iOS 8 needs a different templateReviewURL also @see https://github.com/arashpayan/appirater/issues/182 - ret = templ_iOS8; - } - - // ios7 for everything? - ret = templ_iOS7.replace("APP_ID", String::num(p_app_id)); + String ret = app_url_path.replace("APP_ID", String::num(p_app_id)); printf("returning rate url %s\n", ret.utf8().get_data()); return ret; diff --git a/platform/iphone/joypad_iphone.mm b/platform/iphone/joypad_iphone.mm index 6088f1c25c..b0a8076b56 100644 --- a/platform/iphone/joypad_iphone.mm +++ b/platform/iphone/joypad_iphone.mm @@ -131,8 +131,6 @@ void JoypadIPhone::start_processing() { - (void)dealloc { [self finishObserving]; - - [super dealloc]; } - (int)getJoyIdForController:(GCController *)controller { @@ -251,8 +249,13 @@ void JoypadIPhone::start_processing() { // The extended gamepad profile has all the input you could possibly find on // a gamepad but will only be active if your gamepad actually has all of // these... - controller.extendedGamepad.valueChangedHandler = ^( - GCExtendedGamepad *gamepad, GCControllerElement *element) { + _weakify(self); + _weakify(controller); + + controller.extendedGamepad.valueChangedHandler = ^(GCExtendedGamepad *gamepad, GCControllerElement *element) { + _strongify(self); + _strongify(controller); + int joy_id = [self getJoyIdForController:controller]; if (element == gamepad.buttonA) { @@ -304,71 +307,33 @@ void JoypadIPhone::start_processing() { Input::get_singleton()->joy_axis(joy_id, JOY_AXIS_TRIGGER_RIGHT, jx); }; }; + } else if (controller.microGamepad != nil) { + // micro gamepads were added in OS 9 and feature just 2 buttons and a d-pad + _weakify(self); + _weakify(controller); + + controller.microGamepad.valueChangedHandler = ^(GCMicroGamepad *gamepad, GCControllerElement *element) { + _strongify(self); + _strongify(controller); + + int joy_id = [self getJoyIdForController:controller]; + + if (element == gamepad.buttonA) { + Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_A, + gamepad.buttonA.isPressed); + } else if (element == gamepad.buttonX) { + Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_X, + gamepad.buttonX.isPressed); + } else if (element == gamepad.dpad) { + Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_UP, + gamepad.dpad.up.isPressed); + Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_DOWN, + gamepad.dpad.down.isPressed); + Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_LEFT, gamepad.dpad.left.isPressed); + Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_RIGHT, gamepad.dpad.right.isPressed); + }; + }; } - // else if (controller.gamepad != nil) { - // // gamepad is the standard profile with 4 buttons, shoulder buttons and a - // // D-pad - // controller.gamepad.valueChangedHandler = ^(GCGamepad *gamepad, - // GCControllerElement *element) { - // int joy_id = [self getJoyIdForController:controller]; - // - // if (element == gamepad.buttonA) { - // Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_A, - // gamepad.buttonA.isPressed); - // } else if (element == gamepad.buttonB) { - // Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_B, - // gamepad.buttonB.isPressed); - // } else if (element == gamepad.buttonX) { - // Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_X, - // gamepad.buttonX.isPressed); - // } else if (element == gamepad.buttonY) { - // Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_Y, - // gamepad.buttonY.isPressed); - // } else if (element == gamepad.leftShoulder) { - // Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_LEFT_SHOULDER, - // gamepad.leftShoulder.isPressed); - // } else if (element == gamepad.rightShoulder) { - // Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_RIGHT_SHOULDER, - // gamepad.rightShoulder.isPressed); - // } else if (element == gamepad.dpad) { - // Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_UP, - // gamepad.dpad.up.isPressed); - // Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_DOWN, - // gamepad.dpad.down.isPressed); - // Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_LEFT, - // gamepad.dpad.left.isPressed); - // Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_RIGHT, - // gamepad.dpad.right.isPressed); - // }; - // }; - //#ifdef ADD_MICRO_GAMEPAD // disabling this for now, only available on iOS 9+, - // // while we are setting that as the minimum, seems our - // // build environment doesn't like it - // } else if (controller.microGamepad != nil) { - // // micro gamepads were added in OS 9 and feature just 2 buttons and a d-pad - // controller.microGamepad.valueChangedHandler = - // ^(GCMicroGamepad *gamepad, GCControllerElement *element) { - // int joy_id = [self getJoyIdForController:controller]; - // - // if (element == gamepad.buttonA) { - // Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_A, - // gamepad.buttonA.isPressed); - // } else if (element == gamepad.buttonX) { - // Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_X, - // gamepad.buttonX.isPressed); - // } else if (element == gamepad.dpad) { - // Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_UP, - // gamepad.dpad.up.isPressed); - // Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_DOWN, - // gamepad.dpad.down.isPressed); - // Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_LEFT, - // gamepad.dpad.left.isPressed); - // Input::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_RIGHT, - // gamepad.dpad.right.isPressed); - // }; - // }; - //#endif - // }; ///@TODO need to add support for controller.motion which gives us access to /// the orientation of the device (if supported) diff --git a/platform/iphone/native_video_view.h b/platform/iphone/native_video_view.h new file mode 100644 index 0000000000..d8687b3538 --- /dev/null +++ b/platform/iphone/native_video_view.h @@ -0,0 +1,41 @@ +/*************************************************************************/ +/* native_video_view.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#import <UIKit/UIKit.h> + +@interface GodotNativeVideoView : UIView + +- (BOOL)playVideoAtPath:(NSString *)filePath volume:(float)videoVolume audio:(NSString *)audioTrack subtitle:(NSString *)subtitleTrack; +- (BOOL)isVideoPlaying; +- (void)pauseVideo; +- (void)unpauseVideo; +- (void)stopVideo; + +@end diff --git a/platform/iphone/native_video_view.m b/platform/iphone/native_video_view.m new file mode 100644 index 0000000000..a4e9f209f0 --- /dev/null +++ b/platform/iphone/native_video_view.m @@ -0,0 +1,260 @@ +/*************************************************************************/ +/* native_video_view.m */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#import "native_video_view.h" +#import <AVFoundation/AVFoundation.h> + +@interface GodotNativeVideoView () + +@property(strong, nonatomic) AVAsset *avAsset; +@property(strong, nonatomic) AVPlayerItem *avPlayerItem; +@property(strong, nonatomic) AVPlayer *avPlayer; +@property(strong, nonatomic) AVPlayerLayer *avPlayerLayer; +@property(assign, nonatomic) CMTime videoCurrentTime; +@property(assign, nonatomic) BOOL isVideoCurrentlyPlaying; + +@end + +@implementation GodotNativeVideoView + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + + if (self) { + [self godot_commonInit]; + } + + return self; +} + +- (instancetype)initWithCoder:(NSCoder *)coder { + self = [super initWithCoder:coder]; + + if (self) { + [self godot_commonInit]; + } + + return self; +} + +- (void)godot_commonInit { + self.isVideoCurrentlyPlaying = NO; + self.videoCurrentTime = kCMTimeZero; + + [self observeVideoAudio]; +} + +- (void)observeVideoAudio { + printf("******** adding observer for sound routing changes\n"); + [[NSNotificationCenter defaultCenter] + addObserver:self + selector:@selector(audioRouteChangeListenerCallback:) + name:AVAudioSessionRouteChangeNotification + object:nil]; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + if (object == self.avPlayerItem && [keyPath isEqualToString:@"status"]) { + [self handleVideoOrPlayerStatus]; + } + + if (object == self.avPlayer && [keyPath isEqualToString:@"rate"]) { + [self handleVideoPlayRate]; + } +} + +// MARK: Video Audio + +- (void)audioRouteChangeListenerCallback:(NSNotification *)notification { + printf("*********** route changed!\n"); + NSDictionary *interuptionDict = notification.userInfo; + + NSInteger routeChangeReason = [[interuptionDict valueForKey:AVAudioSessionRouteChangeReasonKey] integerValue]; + + switch (routeChangeReason) { + case AVAudioSessionRouteChangeReasonNewDeviceAvailable: { + NSLog(@"AVAudioSessionRouteChangeReasonNewDeviceAvailable"); + NSLog(@"Headphone/Line plugged in"); + } break; + case AVAudioSessionRouteChangeReasonOldDeviceUnavailable: { + NSLog(@"AVAudioSessionRouteChangeReasonOldDeviceUnavailable"); + NSLog(@"Headphone/Line was pulled. Resuming video play...."); + if ([self isVideoPlaying]) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5f * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ + [self.avPlayer play]; // NOTE: change this line according your current player implementation + NSLog(@"resumed play"); + }); + } + } break; + case AVAudioSessionRouteChangeReasonCategoryChange: { + // called at start - also when other audio wants to play + NSLog(@"AVAudioSessionRouteChangeReasonCategoryChange"); + } break; + } +} + +// MARK: Native Video Player + +- (void)handleVideoOrPlayerStatus { + if (self.avPlayerItem.status == AVPlayerItemStatusFailed || self.avPlayer.status == AVPlayerStatusFailed) { + [self stopVideo]; + } + + if (self.avPlayer.status == AVPlayerStatusReadyToPlay && self.avPlayerItem.status == AVPlayerItemStatusReadyToPlay && CMTimeCompare(self.videoCurrentTime, kCMTimeZero) == 0) { + // NSLog(@"time: %@", self.video_current_time); + [self.avPlayer seekToTime:self.videoCurrentTime]; + self.videoCurrentTime = kCMTimeZero; + } +} + +- (void)handleVideoPlayRate { + NSLog(@"Player playback rate changed: %.5f", self.avPlayer.rate); + if ([self isVideoPlaying] && self.avPlayer.rate == 0.0 && !self.avPlayer.error) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5f * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ + [self.avPlayer play]; // NOTE: change this line according your current player implementation + NSLog(@"resumed play"); + }); + + NSLog(@" . . . PAUSED (or just started)"); + } +} + +- (BOOL)playVideoAtPath:(NSString *)filePath volume:(float)videoVolume audio:(NSString *)audioTrack subtitle:(NSString *)subtitleTrack { + self.avAsset = [AVAsset assetWithURL:[NSURL fileURLWithPath:filePath]]; + + self.avPlayerItem = [AVPlayerItem playerItemWithAsset:self.avAsset]; + [self.avPlayerItem addObserver:self forKeyPath:@"status" options:0 context:nil]; + + self.avPlayer = [AVPlayer playerWithPlayerItem:self.avPlayerItem]; + self.avPlayerLayer = [AVPlayerLayer playerLayerWithPlayer:self.avPlayer]; + + [self.avPlayer addObserver:self forKeyPath:@"status" options:0 context:nil]; + [[NSNotificationCenter defaultCenter] + addObserver:self + selector:@selector(playerItemDidReachEnd:) + name:AVPlayerItemDidPlayToEndTimeNotification + object:[self.avPlayer currentItem]]; + + [self.avPlayer addObserver:self forKeyPath:@"rate" options:NSKeyValueObservingOptionNew context:0]; + + [self.avPlayerLayer setFrame:self.bounds]; + [self.layer addSublayer:self.avPlayerLayer]; + [self.avPlayer play]; + + AVMediaSelectionGroup *audioGroup = [self.avAsset mediaSelectionGroupForMediaCharacteristic:AVMediaCharacteristicAudible]; + + NSMutableArray *allAudioParams = [NSMutableArray array]; + for (id track in audioGroup.options) { + NSString *language = [[track locale] localeIdentifier]; + NSLog(@"subtitle lang: %@", language); + + if ([language isEqualToString:audioTrack]) { + AVMutableAudioMixInputParameters *audioInputParams = [AVMutableAudioMixInputParameters audioMixInputParameters]; + [audioInputParams setVolume:videoVolume atTime:kCMTimeZero]; + [audioInputParams setTrackID:[track trackID]]; + [allAudioParams addObject:audioInputParams]; + + AVMutableAudioMix *audioMix = [AVMutableAudioMix audioMix]; + [audioMix setInputParameters:allAudioParams]; + + [self.avPlayer.currentItem selectMediaOption:track inMediaSelectionGroup:audioGroup]; + [self.avPlayer.currentItem setAudioMix:audioMix]; + + break; + } + } + + AVMediaSelectionGroup *subtitlesGroup = [self.avAsset mediaSelectionGroupForMediaCharacteristic:AVMediaCharacteristicLegible]; + NSArray *useableTracks = [AVMediaSelectionGroup mediaSelectionOptionsFromArray:subtitlesGroup.options withoutMediaCharacteristics:[NSArray arrayWithObject:AVMediaCharacteristicContainsOnlyForcedSubtitles]]; + + for (id track in useableTracks) { + NSString *language = [[track locale] localeIdentifier]; + NSLog(@"subtitle lang: %@", language); + + if ([language isEqualToString:subtitleTrack]) { + [self.avPlayer.currentItem selectMediaOption:track inMediaSelectionGroup:subtitlesGroup]; + break; + } + } + + self.isVideoCurrentlyPlaying = YES; + + return true; +} + +- (BOOL)isVideoPlaying { + if (self.avPlayer.error) { + printf("Error during playback\n"); + } + return (self.avPlayer.rate > 0 && !self.avPlayer.error); +} + +- (void)pauseVideo { + self.videoCurrentTime = self.avPlayer.currentTime; + [self.avPlayer pause]; + self.isVideoCurrentlyPlaying = NO; +} + +- (void)unpauseVideo { + [self.avPlayer play]; + self.isVideoCurrentlyPlaying = YES; +} + +- (void)playerItemDidReachEnd:(NSNotification *)notification { + [self stopVideo]; +} + +- (void)finishPlayingVideo { + [self.avPlayer pause]; + [self.avPlayerLayer removeFromSuperlayer]; + self.avPlayerLayer = nil; + + if (self.avPlayerItem) { + [self.avPlayerItem removeObserver:self forKeyPath:@"status"]; + self.avPlayerItem = nil; + } + + if (self.avPlayer) { + [self.avPlayer removeObserver:self forKeyPath:@"status"]; + self.avPlayer = nil; + } + + self.avAsset = nil; + + self.isVideoCurrentlyPlaying = NO; +} + +- (void)stopVideo { + [self finishPlayingVideo]; + + [self removeFromSuperview]; +} + +@end diff --git a/platform/iphone/os_iphone.mm b/platform/iphone/os_iphone.mm index 946fd51923..e007276b4b 100644 --- a/platform/iphone/os_iphone.mm +++ b/platform/iphone/os_iphone.mm @@ -128,7 +128,6 @@ void OSIPhone::initialize_modules() { #ifdef GAME_CENTER_ENABLED game_center = memnew(GameCenter); Engine::get_singleton()->add_singleton(Engine::Singleton("GameCenter", game_center)); - game_center->connect(); #endif #ifdef STOREKIT_ENABLED @@ -272,7 +271,6 @@ String OSIPhone::get_model_name() const { Error OSIPhone::shell_open(String p_uri) { NSString *urlPath = [[NSString alloc] initWithUTF8String:p_uri.utf8().get_data()]; NSURL *url = [NSURL URLWithString:urlPath]; - [urlPath release]; if (![[UIApplication sharedApplication] canOpenURL:url]) { return ERR_CANT_OPEN; @@ -280,11 +278,7 @@ Error OSIPhone::shell_open(String p_uri) { printf("opening url %s\n", p_uri.utf8().get_data()); - // if (@available(iOS 10, *)) { [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil]; - // } else { - // [[UIApplication sharedApplication] openURL:url]; - // } return OK; }; diff --git a/platform/iphone/platform_config.h b/platform/iphone/platform_config.h index 2bbbe47c0d..ec39ad0ba4 100644 --- a/platform/iphone/platform_config.h +++ b/platform/iphone/platform_config.h @@ -33,3 +33,10 @@ #define PLATFORM_REFCOUNT #define PTHREAD_RENAME_SELF + +#define _weakify(var) __weak typeof(var) GDWeak_##var = var; +#define _strongify(var) \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wshadow\"") \ + __strong typeof(var) var = GDWeak_##var; \ + _Pragma("clang diagnostic pop") diff --git a/platform/iphone/view_controller.h b/platform/iphone/view_controller.h index dffdc01d4a..b0b31ae377 100644 --- a/platform/iphone/view_controller.h +++ b/platform/iphone/view_controller.h @@ -32,17 +32,15 @@ #import <UIKit/UIKit.h> @class GodotView; +@class GodotNativeVideoView; @interface ViewController : UIViewController <GKGameCenterControllerDelegate> -- (GodotView *)godotView; +@property(nonatomic, readonly, strong) GodotView *godotView; +@property(nonatomic, readonly, strong) GodotNativeVideoView *videoView; // MARK: Native Video Player - (BOOL)playVideoAtPath:(NSString *)filePath volume:(float)videoVolume audio:(NSString *)audioTrack subtitle:(NSString *)subtitleTrack; -- (BOOL)isVideoPlaying; -- (void)pauseVideo; -- (void)unpauseVideo; -- (void)stopVideo; @end diff --git a/platform/iphone/view_controller.mm b/platform/iphone/view_controller.mm index 31597f7856..fb25041779 100644 --- a/platform/iphone/view_controller.mm +++ b/platform/iphone/view_controller.mm @@ -33,6 +33,7 @@ #include "display_server_iphone.h" #import "godot_view.h" #import "godot_view_renderer.h" +#import "native_video_view.h" #include "os_iphone.h" #import <GameController/GameController.h> @@ -40,16 +41,7 @@ @interface ViewController () @property(strong, nonatomic) GodotViewRenderer *renderer; - -// TODO: separate view to handle video -// AVPlayer-related properties -@property(strong, nonatomic) AVAsset *avAsset; -@property(strong, nonatomic) AVPlayerItem *avPlayerItem; -@property(strong, nonatomic) AVPlayer *avPlayer; -@property(strong, nonatomic) AVPlayerLayer *avPlayerLayer; -@property(assign, nonatomic) CMTime videoCurrentTime; -@property(assign, nonatomic) BOOL isVideoCurrentlyPlaying; -@property(assign, nonatomic) BOOL videoHasFoundError; +@property(strong, nonatomic) GodotNativeVideoView *videoView; @end @@ -67,9 +59,6 @@ self.view = view; view.renderer = self.renderer; - - [renderer release]; - [view release]; } - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { @@ -93,9 +82,7 @@ } - (void)godot_commonInit { - self.isVideoCurrentlyPlaying = NO; - self.videoCurrentTime = kCMTimeZero; - self.videoHasFoundError = false; + // Initialize view controller values. } - (void)didReceiveMemoryWarning { @@ -107,7 +94,6 @@ [super viewDidLoad]; [self observeKeyboard]; - [self observeAudio]; if (@available(iOS 11.0, *)) { [self setNeedsUpdateOfScreenEdgesDeferringSystemGestures]; @@ -128,33 +114,13 @@ object:nil]; } -- (void)observeAudio { - printf("******** adding observer for sound routing changes\n"); - [[NSNotificationCenter defaultCenter] - addObserver:self - selector:@selector(audioRouteChangeListenerCallback:) - name:AVAudioSessionRouteChangeNotification - object:nil]; -} - -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - if (object == self.avPlayerItem && [keyPath isEqualToString:@"status"]) { - [self handleVideoOrPlayerStatus]; - } - - if (object == self.avPlayer && [keyPath isEqualToString:@"rate"]) { - [self handleVideoPlayRate]; - } -} - - (void)dealloc { - [self stopVideo]; + [self.videoView stopVideo]; + self.videoView = nil; self.renderer = nil; [[NSNotificationCenter defaultCenter] removeObserver:self]; - - [super dealloc]; } // MARK: Orientation @@ -233,166 +199,19 @@ } } -// MARK: Audio - -- (void)audioRouteChangeListenerCallback:(NSNotification *)notification { - printf("*********** route changed!\n"); - NSDictionary *interuptionDict = notification.userInfo; - - NSInteger routeChangeReason = [[interuptionDict valueForKey:AVAudioSessionRouteChangeReasonKey] integerValue]; - - switch (routeChangeReason) { - case AVAudioSessionRouteChangeReasonNewDeviceAvailable: { - NSLog(@"AVAudioSessionRouteChangeReasonNewDeviceAvailable"); - NSLog(@"Headphone/Line plugged in"); - } break; - case AVAudioSessionRouteChangeReasonOldDeviceUnavailable: { - NSLog(@"AVAudioSessionRouteChangeReasonOldDeviceUnavailable"); - NSLog(@"Headphone/Line was pulled. Resuming video play...."); - if ([self isVideoPlaying]) { - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5f * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ - [self.avPlayer play]; // NOTE: change this line according your current player implementation - NSLog(@"resumed play"); - }); - } - } break; - case AVAudioSessionRouteChangeReasonCategoryChange: { - // called at start - also when other audio wants to play - NSLog(@"AVAudioSessionRouteChangeReasonCategoryChange"); - } break; - } -} - // MARK: Native Video Player -- (void)handleVideoOrPlayerStatus { - if (self.avPlayerItem.status == AVPlayerItemStatusFailed || self.avPlayer.status == AVPlayerStatusFailed) { - [self stopVideo]; - self.videoHasFoundError = true; - } - - if (self.avPlayer.status == AVPlayerStatusReadyToPlay && self.avPlayerItem.status == AVPlayerItemStatusReadyToPlay && CMTimeCompare(self.videoCurrentTime, kCMTimeZero) == 0) { - // NSLog(@"time: %@", self.video_current_time); - [self.avPlayer seekToTime:self.videoCurrentTime]; - self.videoCurrentTime = kCMTimeZero; - } -} - -- (void)handleVideoPlayRate { - NSLog(@"Player playback rate changed: %.5f", self.avPlayer.rate); - if ([self isVideoPlaying] && self.avPlayer.rate == 0.0 && !self.avPlayer.error) { - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5f * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ - [self.avPlayer play]; // NOTE: change this line according your current player implementation - NSLog(@"resumed play"); - }); - - NSLog(@" . . . PAUSED (or just started)"); - } -} - - (BOOL)playVideoAtPath:(NSString *)filePath volume:(float)videoVolume audio:(NSString *)audioTrack subtitle:(NSString *)subtitleTrack { - self.avAsset = [AVAsset assetWithURL:[NSURL fileURLWithPath:filePath]]; - - self.avPlayerItem = [AVPlayerItem playerItemWithAsset:self.avAsset]; - [self.avPlayerItem addObserver:self forKeyPath:@"status" options:0 context:nil]; - - self.avPlayer = [AVPlayer playerWithPlayerItem:self.avPlayerItem]; - self.avPlayerLayer = [AVPlayerLayer playerLayerWithPlayer:self.avPlayer]; - - [self.avPlayer addObserver:self forKeyPath:@"status" options:0 context:nil]; - [[NSNotificationCenter defaultCenter] - addObserver:self - selector:@selector(playerItemDidReachEnd:) - name:AVPlayerItemDidPlayToEndTimeNotification - object:[self.avPlayer currentItem]]; - - [self.avPlayer addObserver:self forKeyPath:@"rate" options:NSKeyValueObservingOptionNew context:0]; - - [self.avPlayerLayer setFrame:self.view.bounds]; - [self.view.layer addSublayer:self.avPlayerLayer]; - [self.avPlayer play]; - - AVMediaSelectionGroup *audioGroup = [self.avAsset mediaSelectionGroupForMediaCharacteristic:AVMediaCharacteristicAudible]; - - NSMutableArray *allAudioParams = [NSMutableArray array]; - for (id track in audioGroup.options) { - NSString *language = [[track locale] localeIdentifier]; - NSLog(@"subtitle lang: %@", language); - - if ([language isEqualToString:audioTrack]) { - AVMutableAudioMixInputParameters *audioInputParams = [AVMutableAudioMixInputParameters audioMixInputParameters]; - [audioInputParams setVolume:videoVolume atTime:kCMTimeZero]; - [audioInputParams setTrackID:[track trackID]]; - [allAudioParams addObject:audioInputParams]; - - AVMutableAudioMix *audioMix = [AVMutableAudioMix audioMix]; - [audioMix setInputParameters:allAudioParams]; - - [self.avPlayer.currentItem selectMediaOption:track inMediaSelectionGroup:audioGroup]; - [self.avPlayer.currentItem setAudioMix:audioMix]; - - break; - } - } - - AVMediaSelectionGroup *subtitlesGroup = [self.avAsset mediaSelectionGroupForMediaCharacteristic:AVMediaCharacteristicLegible]; - NSArray *useableTracks = [AVMediaSelectionGroup mediaSelectionOptionsFromArray:subtitlesGroup.options withoutMediaCharacteristics:[NSArray arrayWithObject:AVMediaCharacteristicContainsOnlyForcedSubtitles]]; - - for (id track in useableTracks) { - NSString *language = [[track locale] localeIdentifier]; - NSLog(@"subtitle lang: %@", language); - - if ([language isEqualToString:subtitleTrack]) { - [self.avPlayer.currentItem selectMediaOption:track inMediaSelectionGroup:subtitlesGroup]; - break; - } - } - - self.isVideoCurrentlyPlaying = YES; - - return true; -} - -- (BOOL)isVideoPlaying { - if (self.avPlayer.error) { - printf("Error during playback\n"); - } - return (self.avPlayer.rate > 0 && !self.avPlayer.error); -} - -- (void)pauseVideo { - self.videoCurrentTime = self.avPlayer.currentTime; - [self.avPlayer pause]; - self.isVideoCurrentlyPlaying = NO; -} - -- (void)unpauseVideo { - [self.avPlayer play]; - self.isVideoCurrentlyPlaying = YES; -} - -- (void)playerItemDidReachEnd:(NSNotification *)notification { - [self stopVideo]; -} - -- (void)stopVideo { - [self.avPlayer pause]; - [self.avPlayerLayer removeFromSuperlayer]; - self.avPlayerLayer = nil; - - if (self.avPlayerItem) { - [self.avPlayerItem removeObserver:self forKeyPath:@"status"]; - self.avPlayerItem = nil; - } - - if (self.avPlayer) { - [self.avPlayer removeObserver:self forKeyPath:@"status"]; - self.avPlayer = nil; + // If we are showing some video already, reuse existing view for new video. + if (self.videoView) { + return [self.videoView playVideoAtPath:filePath volume:videoVolume audio:audioTrack subtitle:subtitleTrack]; + } else { + // Create autoresizing view for video playback. + GodotNativeVideoView *videoView = [[GodotNativeVideoView alloc] initWithFrame:self.view.bounds]; + videoView.autoresizingMask = UIViewAutoresizingFlexibleWidth & UIViewAutoresizingFlexibleHeight; + [self.view addSubview:videoView]; + return [self.videoView playVideoAtPath:filePath volume:videoVolume audio:audioTrack subtitle:subtitleTrack]; } - - self.avAsset = nil; - - self.isVideoCurrentlyPlaying = NO; } // MARK: Delegates diff --git a/platform/iphone/vulkan_context_iphone.mm b/platform/iphone/vulkan_context_iphone.mm index cb4dbe7f85..d62e826957 100644 --- a/platform/iphone/vulkan_context_iphone.mm +++ b/platform/iphone/vulkan_context_iphone.mm @@ -35,14 +35,12 @@ const char *VulkanContextIPhone::_get_platform_surface_extension() const { return VK_MVK_IOS_SURFACE_EXTENSION_NAME; } -Error VulkanContextIPhone::window_create(DisplayServer::WindowID p_window_id, - CALayer *p_metal_layer, int p_width, - int p_height) { +Error VulkanContextIPhone::window_create(DisplayServer::WindowID p_window_id, CALayer *p_metal_layer, int p_width, int p_height) { VkIOSSurfaceCreateInfoMVK createInfo; createInfo.sType = VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK; createInfo.pNext = NULL; createInfo.flags = 0; - createInfo.pView = p_metal_layer; + createInfo.pView = (__bridge const void *)p_metal_layer; VkSurfaceKHR surface; VkResult err = diff --git a/platform/javascript/SCsub b/platform/javascript/SCsub index dcf9a46bf9..a8861124b9 100644 --- a/platform/javascript/SCsub +++ b/platform/javascript/SCsub @@ -19,6 +19,7 @@ build = env.add_program(build_targets, javascript_files) js_libraries = [ "native/http_request.js", + "native/library_godot_audio.js", ] for lib in js_libraries: env.Append(LINKFLAGS=["--js-library", env.File(lib).path]) @@ -66,5 +67,5 @@ env.Zip( zip_files, ZIPROOT=zip_dir, ZIPSUFFIX="${PROGSUFFIX}${ZIPSUFFIX}", - ZIPCOMSTR="Archving $SOURCES as $TARGET", + ZIPCOMSTR="Archiving $SOURCES as $TARGET", ) diff --git a/platform/javascript/audio_driver_javascript.cpp b/platform/javascript/audio_driver_javascript.cpp index 9604914b2c..6ea948004e 100644 --- a/platform/javascript/audio_driver_javascript.cpp +++ b/platform/javascript/audio_driver_javascript.cpp @@ -31,34 +31,57 @@ #include "audio_driver_javascript.h" #include "core/project_settings.h" +#include "godot_audio.h" #include <emscripten.h> AudioDriverJavaScript *AudioDriverJavaScript::singleton = nullptr; bool AudioDriverJavaScript::is_available() { - return EM_ASM_INT({ - if (!(window.AudioContext || window.webkitAudioContext)) { - return 0; - } - return 1; - }) != 0; + return godot_audio_is_available() != 0; } const char *AudioDriverJavaScript::get_name() const { return "JavaScript"; } -extern "C" EMSCRIPTEN_KEEPALIVE void audio_driver_js_mix() { - AudioDriverJavaScript::singleton->mix_to_js(); +#ifndef NO_THREADS +void AudioDriverJavaScript::_audio_thread_func(void *p_data) { + AudioDriverJavaScript *obj = static_cast<AudioDriverJavaScript *>(p_data); + while (!obj->quit) { + obj->lock(); + if (!obj->needs_process) { + obj->unlock(); + OS::get_singleton()->delay_usec(1000); // Give the browser some slack. + continue; + } + obj->_js_driver_process(); + obj->needs_process = false; + obj->unlock(); + } +} +#endif + +extern "C" EMSCRIPTEN_KEEPALIVE void audio_driver_process_start() { +#ifndef NO_THREADS + AudioDriverJavaScript::singleton->lock(); +#else + AudioDriverJavaScript::singleton->_js_driver_process(); +#endif +} + +extern "C" EMSCRIPTEN_KEEPALIVE void audio_driver_process_end() { +#ifndef NO_THREADS + AudioDriverJavaScript::singleton->needs_process = true; + AudioDriverJavaScript::singleton->unlock(); +#endif } extern "C" EMSCRIPTEN_KEEPALIVE void audio_driver_process_capture(float sample) { AudioDriverJavaScript::singleton->process_capture(sample); } -void AudioDriverJavaScript::mix_to_js() { - int channel_count = get_total_channels_by_speaker_mode(get_speaker_mode()); +void AudioDriverJavaScript::_js_driver_process() { int sample_count = memarr_len(internal_buffer) / channel_count; int32_t *stream_buffer = reinterpret_cast<int32_t *>(internal_buffer); audio_server_process(sample_count, stream_buffer); @@ -73,37 +96,12 @@ void AudioDriverJavaScript::process_capture(float sample) { } Error AudioDriverJavaScript::init() { - int mix_rate = GLOBAL_GET("audio/mix_rate"); + mix_rate = GLOBAL_GET("audio/mix_rate"); int latency = GLOBAL_GET("audio/output_latency"); - /* clang-format off */ - _driver_id = EM_ASM_INT({ - const MIX_RATE = $0; - const LATENCY = $1 / 1000; - return Module.IDHandler.add({ - 'context': new (window.AudioContext || window.webkitAudioContext)({ sampleRate: MIX_RATE, latencyHint: LATENCY}), - 'input': null, - 'stream': null, - 'script': null - }); - }, mix_rate, latency); - /* clang-format on */ - - int channel_count = get_total_channels_by_speaker_mode(get_speaker_mode()); + channel_count = godot_audio_init(mix_rate, latency); buffer_length = closest_power_of_2((latency * mix_rate / 1000) * channel_count); - /* clang-format off */ - buffer_length = EM_ASM_INT({ - var ref = Module.IDHandler.get($0); - const ctx = ref['context']; - const BUFFER_LENGTH = $1; - const CHANNEL_COUNT = $2; - - var script = ctx.createScriptProcessor(BUFFER_LENGTH, 2, CHANNEL_COUNT); - script.connect(ctx.destination); - ref['script'] = script; - return script.bufferSize; - }, _driver_id, buffer_length, channel_count); - /* clang-format on */ + buffer_length = godot_audio_create_processor(buffer_length, channel_count); if (!buffer_length) { return FAILED; } @@ -114,134 +112,60 @@ Error AudioDriverJavaScript::init() { internal_buffer = memnew_arr(float, buffer_length *channel_count); } - return internal_buffer ? OK : ERR_OUT_OF_MEMORY; + if (!internal_buffer) { + return ERR_OUT_OF_MEMORY; + } + return OK; } void AudioDriverJavaScript::start() { - /* clang-format off */ - EM_ASM({ - const ref = Module.IDHandler.get($0); - var INTERNAL_BUFFER_PTR = $1; - - var audioDriverMixFunction = cwrap('audio_driver_js_mix'); - var audioDriverProcessCapture = cwrap('audio_driver_process_capture', null, ['number']); - ref['script'].onaudioprocess = function(audioProcessingEvent) { - audioDriverMixFunction(); - - var input = audioProcessingEvent.inputBuffer; - var output = audioProcessingEvent.outputBuffer; - var internalBuffer = HEAPF32.subarray( - INTERNAL_BUFFER_PTR / HEAPF32.BYTES_PER_ELEMENT, - INTERNAL_BUFFER_PTR / HEAPF32.BYTES_PER_ELEMENT + output.length * output.numberOfChannels); - - for (var channel = 0; channel < output.numberOfChannels; channel++) { - var outputData = output.getChannelData(channel); - // Loop through samples. - for (var sample = 0; sample < outputData.length; sample++) { - outputData[sample] = internalBuffer[sample * output.numberOfChannels + channel]; - } - } - - if (ref['input']) { - var inputDataL = input.getChannelData(0); - var inputDataR = input.getChannelData(1); - for (var i = 0; i < inputDataL.length; i++) { - audioDriverProcessCapture(inputDataL[i]); - audioDriverProcessCapture(inputDataR[i]); - } - } - }; - }, _driver_id, internal_buffer); - /* clang-format on */ +#ifndef NO_THREADS + thread = Thread::create(_audio_thread_func, this); +#endif + godot_audio_start(internal_buffer); } void AudioDriverJavaScript::resume() { - /* clang-format off */ - EM_ASM({ - const ref = Module.IDHandler.get($0); - if (ref && ref['context'] && ref['context'].resume) - ref['context'].resume(); - }, _driver_id); - /* clang-format on */ + godot_audio_resume(); } float AudioDriverJavaScript::get_latency() { - /* clang-format off */ - return EM_ASM_DOUBLE({ - const ref = Module.IDHandler.get($0); - var latency = 0; - if (ref && ref['context']) { - const ctx = ref['context']; - if (ctx.baseLatency) { - latency += ctx.baseLatency; - } - if (ctx.outputLatency) { - latency += ctx.outputLatency; - } - } - return latency; - }, _driver_id); - /* clang-format on */ + return godot_audio_get_latency(); } int AudioDriverJavaScript::get_mix_rate() const { - /* clang-format off */ - return EM_ASM_INT({ - const ref = Module.IDHandler.get($0); - return ref && ref['context'] ? ref['context'].sampleRate : 0; - }, _driver_id); - /* clang-format on */ + return mix_rate; } AudioDriver::SpeakerMode AudioDriverJavaScript::get_speaker_mode() const { - /* clang-format off */ - return get_speaker_mode_by_total_channels(EM_ASM_INT({ - const ref = Module.IDHandler.get($0); - return ref && ref['context'] ? ref['context'].destination.channelCount : 0; - }, _driver_id)); - /* clang-format on */ + return get_speaker_mode_by_total_channels(channel_count); } -// No locking, as threads are not supported. void AudioDriverJavaScript::lock() { +#ifndef NO_THREADS + mutex.lock(); +#endif } void AudioDriverJavaScript::unlock() { +#ifndef NO_THREADS + mutex.unlock(); +#endif } void AudioDriverJavaScript::finish_async() { - // Close the context, add the operation to the async_finish list in module. - int id = _driver_id; - _driver_id = 0; - - /* clang-format off */ - EM_ASM({ - const id = $0; - var ref = Module.IDHandler.get(id); - Module.async_finish.push(new Promise(function(accept, reject) { - if (!ref) { - console.log("Ref not found!", id, Module.IDHandler); - setTimeout(accept, 0); - } else { - Module.IDHandler.remove(id); - const context = ref['context']; - // Disconnect script and input. - ref['script'].disconnect(); - if (ref['input']) - ref['input'].disconnect(); - ref = null; - context.close().then(function() { - accept(); - }).catch(function(e) { - accept(); - }); - } - })); - }, id); - /* clang-format on */ +#ifndef NO_THREADS + quit = true; // Ask thread to quit. +#endif + godot_audio_finish_async(); } void AudioDriverJavaScript::finish() { +#ifndef NO_THREADS + Thread::wait_to_finish(thread); + memdelete(thread); + thread = NULL; +#endif if (internal_buffer) { memdelete_arr(internal_buffer); internal_buffer = nullptr; @@ -249,56 +173,14 @@ void AudioDriverJavaScript::finish() { } Error AudioDriverJavaScript::capture_start() { + godot_audio_capture_stop(); input_buffer_init(buffer_length); - - /* clang-format off */ - EM_ASM({ - function gotMediaInput(stream) { - var ref = Module.IDHandler.get($0); - ref['stream'] = stream; - ref['input'] = ref['context'].createMediaStreamSource(stream); - ref['input'].connect(ref['script']); - } - - function gotMediaInputError(e) { - out(e); - } - - if (navigator.mediaDevices.getUserMedia) { - navigator.mediaDevices.getUserMedia({"audio": true}).then(gotMediaInput, gotMediaInputError); - } else { - if (!navigator.getUserMedia) - navigator.getUserMedia = navigator.webkitGetUserMedia || navigator.mozGetUserMedia; - navigator.getUserMedia({"audio": true}, gotMediaInput, gotMediaInputError); - } - }, _driver_id); - /* clang-format on */ - + godot_audio_capture_start(); return OK; } Error AudioDriverJavaScript::capture_stop() { - /* clang-format off */ - EM_ASM({ - var ref = Module.IDHandler.get($0); - if (ref['stream']) { - const tracks = ref['stream'].getTracks(); - for (var i = 0; i < tracks.length; i++) { - tracks[i].stop(); - } - ref['stream'] = null; - } - - if (ref['input']) { - ref['input'].disconnect(); - ref['input'] = null; - } - - }, _driver_id); - /* clang-format on */ - input_buffer.clear(); - return OK; } diff --git a/platform/javascript/audio_driver_javascript.h b/platform/javascript/audio_driver_javascript.h index f029a91db0..56a7da0307 100644 --- a/platform/javascript/audio_driver_javascript.h +++ b/platform/javascript/audio_driver_javascript.h @@ -33,34 +33,49 @@ #include "servers/audio_server.h" +#include "core/os/mutex.h" +#include "core/os/thread.h" + class AudioDriverJavaScript : public AudioDriver { +private: float *internal_buffer = nullptr; - int _driver_id = 0; int buffer_length = 0; + int mix_rate = 0; + int channel_count = 0; public: +#ifndef NO_THREADS + Mutex mutex; + Thread *thread = nullptr; + bool quit = false; + bool needs_process = true; + + static void _audio_thread_func(void *p_data); +#endif + + void _js_driver_process(); + static bool is_available(); - void mix_to_js(); void process_capture(float sample); static AudioDriverJavaScript *singleton; - virtual const char *get_name() const; + const char *get_name() const override; - virtual Error init(); - virtual void start(); + Error init() override; + void start() override; void resume(); - virtual float get_latency(); - virtual int get_mix_rate() const; - virtual SpeakerMode get_speaker_mode() const; - virtual void lock(); - virtual void unlock(); - virtual void finish(); + float get_latency() override; + int get_mix_rate() const override; + SpeakerMode get_speaker_mode() const override; + void lock() override; + void unlock() override; + void finish() override; void finish_async(); - virtual Error capture_start(); - virtual Error capture_stop(); + Error capture_start() override; + Error capture_stop() override; AudioDriverJavaScript(); }; diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index 81287cead8..4b5890545f 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -1,6 +1,7 @@ import os -from emscripten_helpers import parse_config, run_closure_compiler, create_engine_file +from emscripten_helpers import run_closure_compiler, create_engine_file +from SCons.Util import WhereIs def is_active(): @@ -12,7 +13,7 @@ def get_name(): def can_build(): - return "EM_CONFIG" in os.environ or os.path.exists(os.path.expanduser("~/.emscripten")) + return WhereIs("emcc") is not None def get_opts(): @@ -100,9 +101,6 @@ def configure(env): # Closure compiler extern and support for ecmascript specs (const, let, etc). env["ENV"]["EMCC_CLOSURE_ARGS"] = "--language_in ECMASCRIPT6" - em_config = parse_config() - env.PrependENVPath("PATH", em_config["EMCC_ROOT"]) - env["CC"] = "emcc" env["CXX"] = "em++" env["LINK"] = "emcc" @@ -139,6 +137,7 @@ def configure(env): env.Append(LINKFLAGS=["-s", "USE_PTHREADS=1"]) env.Append(LINKFLAGS=["-s", "PTHREAD_POOL_SIZE=4"]) env.Append(LINKFLAGS=["-s", "WASM_MEM_MAX=2048MB"]) + env.extra_suffix = ".threads" + env.extra_suffix else: env.Append(CPPDEFINES=["NO_THREADS"]) diff --git a/platform/javascript/display_server_javascript.cpp b/platform/javascript/display_server_javascript.cpp index 2fd1f45939..8dc33bdf64 100644 --- a/platform/javascript/display_server_javascript.cpp +++ b/platform/javascript/display_server_javascript.cpp @@ -75,7 +75,7 @@ bool DisplayServerJavaScript::check_size_force_redraw() { if (last_width != canvas_width || last_height != canvas_height) { last_width = canvas_width; last_height = canvas_height; - // Update the framebuffer size and for redraw. + // Update the framebuffer size for redraw. emscripten_set_canvas_element_size(DisplayServerJavaScript::canvas_id, canvas_width, canvas_height); return true; } @@ -892,15 +892,18 @@ DisplayServerJavaScript::DisplayServerJavaScript(const String &p_rendering_drive #define SET_EM_CALLBACK(target, ev, cb) \ result = emscripten_set_##ev##_callback(target, nullptr, true, &cb); \ EM_CHECK(ev) +#define SET_EM_WINDOW_CALLBACK(ev, cb) \ + result = emscripten_set_##ev##_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, NULL, false, &cb); \ + EM_CHECK(ev) #define SET_EM_CALLBACK_NOTARGET(ev, cb) \ result = emscripten_set_##ev##_callback(nullptr, true, &cb); \ EM_CHECK(ev) // These callbacks from Emscripten's html5.h suffice to access most // JavaScript APIs. For APIs that are not (sufficiently) exposed, EM_ASM // is used below. - SET_EM_CALLBACK(EMSCRIPTEN_EVENT_TARGET_WINDOW, mousemove, mousemove_callback) SET_EM_CALLBACK(canvas_id, mousedown, mouse_button_callback) - SET_EM_CALLBACK(EMSCRIPTEN_EVENT_TARGET_WINDOW, mouseup, mouse_button_callback) + SET_EM_WINDOW_CALLBACK(mousemove, mousemove_callback) + SET_EM_WINDOW_CALLBACK(mouseup, mouse_button_callback) SET_EM_CALLBACK(canvas_id, wheel, wheel_callback) SET_EM_CALLBACK(canvas_id, touchstart, touch_press_callback) SET_EM_CALLBACK(canvas_id, touchmove, touchmove_callback) @@ -918,27 +921,25 @@ DisplayServerJavaScript::DisplayServerJavaScript(const String &p_rendering_drive /* clang-format off */ EM_ASM_ARGS({ - Module.listeners = {}; + // Bind native event listeners. + // Module.listeners, and Module.drop_handler are defined in native/utils.js const canvas = Module['canvas']; const send_window_event = cwrap('send_window_event', null, ['number']); const notifications = arguments; (['mouseover', 'mouseleave', 'focus', 'blur']).forEach(function(event, index) { - Module.listeners[event] = send_window_event.bind(null, notifications[index]); - canvas.addEventListener(event, Module.listeners[event]); + Module.listeners.add(canvas, event, send_window_event.bind(null, notifications[index]), true); }); // Clipboard const update_clipboard = cwrap('update_clipboard', null, ['string']); - Module.listeners['paste'] = function(evt) { + Module.listeners.add(window, 'paste', function(evt) { update_clipboard(evt.clipboardData.getData('text')); - }; - window.addEventListener('paste', Module.listeners['paste'], false); - Module.listeners['dragover'] = function(ev) { + }, false); + // Drag an drop + Module.listeners.add(canvas, 'dragover', function(ev) { // Prevent default behavior (which would try to open the file(s)) ev.preventDefault(); - }; - Module.listeners['drop'] = Module.drop_handler; // Defined in native/utils.js - canvas.addEventListener('dragover', Module.listeners['dragover'], false); - canvas.addEventListener('drop', Module.listeners['drop'], false); + }, false); + Module.listeners.add(canvas, 'drop', Module.drop_handler, false); }, WINDOW_EVENT_MOUSE_ENTER, WINDOW_EVENT_MOUSE_EXIT, @@ -952,14 +953,7 @@ DisplayServerJavaScript::DisplayServerJavaScript(const String &p_rendering_drive DisplayServerJavaScript::~DisplayServerJavaScript() { EM_ASM({ - Object.entries(Module.listeners).forEach(function(kv) { - if (kv[0] == 'paste') { - window.removeEventListener(kv[0], kv[1], true); - } else { - Module['canvas'].removeEventListener(kv[0], kv[1]); - } - }); - Module.listeners = {}; + Module.listeners.clear(); }); //emscripten_webgl_commit_frame(); //emscripten_webgl_destroy_context(webgl_ctx); @@ -1109,7 +1103,11 @@ Size2i DisplayServerJavaScript::window_get_min_size(WindowID p_window) const { void DisplayServerJavaScript::window_set_size(const Size2i p_size, WindowID p_window) { last_width = p_size.x; last_height = p_size.y; - emscripten_set_canvas_element_size(canvas_id, p_size.x, p_size.y); + double scale = EM_ASM_DOUBLE({ + return window.devicePixelRatio || 1; + }); + emscripten_set_canvas_element_size(canvas_id, p_size.x * scale, p_size.y * scale); + emscripten_set_element_css_size(canvas_id, p_size.x, p_size.y); } Size2i DisplayServerJavaScript::window_get_size(WindowID p_window) const { diff --git a/platform/javascript/display_server_javascript.h b/platform/javascript/display_server_javascript.h index 6569ef1e42..d7116be36f 100644 --- a/platform/javascript/display_server_javascript.h +++ b/platform/javascript/display_server_javascript.h @@ -93,7 +93,7 @@ class DisplayServerJavaScript : public DisplayServer { static void _dispatch_input_event(const Ref<InputEvent> &p_event); protected: - virtual int get_current_video_driver() const; + int get_current_video_driver() const; public: // Override return type to make writing static callbacks less tedious. @@ -113,92 +113,92 @@ public: bool check_size_force_redraw(); // from DisplayServer - virtual void alert(const String &p_alert, const String &p_title = "ALERT!"); - virtual bool has_feature(Feature p_feature) const; - virtual String get_name() const; + void alert(const String &p_alert, const String &p_title = "ALERT!") override; + bool has_feature(Feature p_feature) const override; + String get_name() const override; // cursor - virtual void cursor_set_shape(CursorShape p_shape); - virtual CursorShape cursor_get_shape() const; - virtual void cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape = CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()); + void cursor_set_shape(CursorShape p_shape) override; + CursorShape cursor_get_shape() const override; + void cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape = CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()) override; // mouse - virtual void mouse_set_mode(MouseMode p_mode); - virtual MouseMode mouse_get_mode() const; + void mouse_set_mode(MouseMode p_mode) override; + MouseMode mouse_get_mode() const override; // touch - virtual bool screen_is_touchscreen(int p_screen = SCREEN_OF_MAIN_WINDOW) const; + bool screen_is_touchscreen(int p_screen = SCREEN_OF_MAIN_WINDOW) const override; // clipboard - virtual void clipboard_set(const String &p_text); - virtual String clipboard_get() const; + void clipboard_set(const String &p_text) override; + String clipboard_get() const override; // screen - virtual int get_screen_count() const; - virtual Point2i screen_get_position(int p_screen = SCREEN_OF_MAIN_WINDOW) const; - virtual Size2i screen_get_size(int p_screen = SCREEN_OF_MAIN_WINDOW) const; - virtual Rect2i screen_get_usable_rect(int p_screen = SCREEN_OF_MAIN_WINDOW) const; - virtual int screen_get_dpi(int p_screen = SCREEN_OF_MAIN_WINDOW) const; + int get_screen_count() const override; + Point2i screen_get_position(int p_screen = SCREEN_OF_MAIN_WINDOW) const override; + Size2i screen_get_size(int p_screen = SCREEN_OF_MAIN_WINDOW) const override; + Rect2i screen_get_usable_rect(int p_screen = SCREEN_OF_MAIN_WINDOW) const override; + int screen_get_dpi(int p_screen = SCREEN_OF_MAIN_WINDOW) const override; // windows - virtual Vector<DisplayServer::WindowID> get_window_list() const; - virtual WindowID get_window_at_screen_position(const Point2i &p_position) const; + Vector<DisplayServer::WindowID> get_window_list() const override; + WindowID get_window_at_screen_position(const Point2i &p_position) const override; - virtual void window_attach_instance_id(ObjectID p_instance, WindowID p_window = MAIN_WINDOW_ID); - virtual ObjectID window_get_attached_instance_id(WindowID p_window = MAIN_WINDOW_ID) const; + void window_attach_instance_id(ObjectID p_instance, WindowID p_window = MAIN_WINDOW_ID) override; + ObjectID window_get_attached_instance_id(WindowID p_window = MAIN_WINDOW_ID) const override; - virtual void window_set_rect_changed_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID); + void window_set_rect_changed_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override; - virtual void window_set_window_event_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID); - virtual void window_set_input_event_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID); - virtual void window_set_input_text_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID); + void window_set_window_event_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override; + void window_set_input_event_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override; + void window_set_input_text_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override; - virtual void window_set_drop_files_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID); + void window_set_drop_files_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override; - virtual void window_set_title(const String &p_title, WindowID p_window = MAIN_WINDOW_ID); + void window_set_title(const String &p_title, WindowID p_window = MAIN_WINDOW_ID) override; - virtual int window_get_current_screen(WindowID p_window = MAIN_WINDOW_ID) const; - virtual void window_set_current_screen(int p_screen, WindowID p_window = MAIN_WINDOW_ID); + int window_get_current_screen(WindowID p_window = MAIN_WINDOW_ID) const override; + void window_set_current_screen(int p_screen, WindowID p_window = MAIN_WINDOW_ID) override; - virtual Point2i window_get_position(WindowID p_window = MAIN_WINDOW_ID) const; - virtual void window_set_position(const Point2i &p_position, WindowID p_window = MAIN_WINDOW_ID); + Point2i window_get_position(WindowID p_window = MAIN_WINDOW_ID) const override; + void window_set_position(const Point2i &p_position, WindowID p_window = MAIN_WINDOW_ID) override; - virtual void window_set_transient(WindowID p_window, WindowID p_parent); + void window_set_transient(WindowID p_window, WindowID p_parent) override; - virtual void window_set_max_size(const Size2i p_size, WindowID p_window = MAIN_WINDOW_ID); - virtual Size2i window_get_max_size(WindowID p_window = MAIN_WINDOW_ID) const; + void window_set_max_size(const Size2i p_size, WindowID p_window = MAIN_WINDOW_ID) override; + Size2i window_get_max_size(WindowID p_window = MAIN_WINDOW_ID) const override; - virtual void window_set_min_size(const Size2i p_size, WindowID p_window = MAIN_WINDOW_ID); - virtual Size2i window_get_min_size(WindowID p_window = MAIN_WINDOW_ID) const; + void window_set_min_size(const Size2i p_size, WindowID p_window = MAIN_WINDOW_ID) override; + Size2i window_get_min_size(WindowID p_window = MAIN_WINDOW_ID) const override; - virtual void window_set_size(const Size2i p_size, WindowID p_window = MAIN_WINDOW_ID); - virtual Size2i window_get_size(WindowID p_window = MAIN_WINDOW_ID) const; - virtual Size2i window_get_real_size(WindowID p_window = MAIN_WINDOW_ID) const; // FIXME: Find clearer name for this. + void window_set_size(const Size2i p_size, WindowID p_window = MAIN_WINDOW_ID) override; + Size2i window_get_size(WindowID p_window = MAIN_WINDOW_ID) const override; + Size2i window_get_real_size(WindowID p_window = MAIN_WINDOW_ID) const override; - virtual void window_set_mode(WindowMode p_mode, WindowID p_window = MAIN_WINDOW_ID); - virtual WindowMode window_get_mode(WindowID p_window = MAIN_WINDOW_ID) const; + void window_set_mode(WindowMode p_mode, WindowID p_window = MAIN_WINDOW_ID) override; + WindowMode window_get_mode(WindowID p_window = MAIN_WINDOW_ID) const override; - virtual bool window_is_maximize_allowed(WindowID p_window = MAIN_WINDOW_ID) const; + bool window_is_maximize_allowed(WindowID p_window = MAIN_WINDOW_ID) const override; - virtual void window_set_flag(WindowFlags p_flag, bool p_enabled, WindowID p_window = MAIN_WINDOW_ID); - virtual bool window_get_flag(WindowFlags p_flag, WindowID p_window = MAIN_WINDOW_ID) const; + void window_set_flag(WindowFlags p_flag, bool p_enabled, WindowID p_window = MAIN_WINDOW_ID) override; + bool window_get_flag(WindowFlags p_flag, WindowID p_window = MAIN_WINDOW_ID) const override; - virtual void window_request_attention(WindowID p_window = MAIN_WINDOW_ID); - virtual void window_move_to_foreground(WindowID p_window = MAIN_WINDOW_ID); + void window_request_attention(WindowID p_window = MAIN_WINDOW_ID) override; + void window_move_to_foreground(WindowID p_window = MAIN_WINDOW_ID) override; - virtual bool window_can_draw(WindowID p_window = MAIN_WINDOW_ID) const; + bool window_can_draw(WindowID p_window = MAIN_WINDOW_ID) const override; - virtual bool can_any_window_draw() const; + bool can_any_window_draw() const override; // events - virtual void process_events(); + void process_events() override; // icon - virtual void set_icon(const Ref<Image> &p_icon); + void set_icon(const Ref<Image> &p_icon) override; // others - virtual bool get_swap_cancel_ok(); - virtual void swap_buffers(); + bool get_swap_cancel_ok() override; + void swap_buffers() override; static void register_javascript_driver(); DisplayServerJavaScript(const String &p_rendering_driver, WindowMode p_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error); diff --git a/platform/javascript/emscripten_helpers.py b/platform/javascript/emscripten_helpers.py index a55c9d3f48..f6db10fbbd 100644 --- a/platform/javascript/emscripten_helpers.py +++ b/platform/javascript/emscripten_helpers.py @@ -1,28 +1,11 @@ import os - -def parse_config(): - em_config_file = os.getenv("EM_CONFIG") or os.path.expanduser("~/.emscripten") - if not os.path.exists(em_config_file): - raise RuntimeError("Emscripten configuration file '%s' does not exist" % em_config_file) - - normalized = {} - em_config = {} - with open(em_config_file) as f: - try: - # Emscripten configuration file is a Python file with simple assignments. - exec(f.read(), em_config) - except StandardError as e: - raise RuntimeError("Emscripten configuration file '%s' is invalid:\n%s" % (em_config_file, e)) - normalized["EMCC_ROOT"] = em_config.get("EMSCRIPTEN_ROOT") - normalized["NODE_JS"] = em_config.get("NODE_JS") - normalized["CLOSURE_BIN"] = os.path.join(normalized["EMCC_ROOT"], "node_modules", ".bin", "google-closure-compiler") - return normalized +from SCons.Util import WhereIs def run_closure_compiler(target, source, env, for_signature): - cfg = parse_config() - cmd = [cfg["NODE_JS"], cfg["CLOSURE_BIN"]] + closure_bin = os.path.join(os.path.dirname(WhereIs("emcc")), "node_modules", ".bin", "google-closure-compiler") + cmd = [WhereIs("node"), closure_bin] cmd.extend(["--compilation_level", "ADVANCED_OPTIMIZATIONS"]) for f in env["JSEXTERNS"]: cmd.extend(["--externs", f.get_abspath()]) diff --git a/platform/javascript/engine/engine.js b/platform/javascript/engine/engine.js index 2630812814..adcd919a6b 100644 --- a/platform/javascript/engine/engine.js +++ b/platform/javascript/engine/engine.js @@ -33,6 +33,7 @@ Function('return this')()['Engine'] = (function() { this.resizeCanvasOnStart = false; this.onExecute = null; this.onExit = null; + this.persistentPaths = []; }; Engine.prototype.init = /** @param {string=} basePath */ function(basePath) { @@ -56,12 +57,14 @@ Function('return this')()['Engine'] = (function() { config['locateFile'] = Utils.createLocateRewrite(loadPath); config['instantiateWasm'] = Utils.createInstantiatePromise(loadPromise); Godot(config).then(function(module) { - me.rtenv = module; - if (unloadAfterInit) { - unload(); - } - resolve(); - config = null; + module['initFS'](me.persistentPaths).then(function(fs_err) { + me.rtenv = module; + if (unloadAfterInit) { + unload(); + } + resolve(); + config = null; + }); }); }); return initPromise; @@ -220,6 +223,10 @@ Function('return this')()['Engine'] = (function() { this.rtenv['copyToFS'](path, buffer); }; + Engine.prototype.setPersistentPaths = function(persistentPaths) { + this.persistentPaths = persistentPaths; + }; + // Closure compiler exported engine methods. /** @export */ Engine['isWebGLAvailable'] = Utils.isWebGLAvailable; @@ -241,5 +248,6 @@ Function('return this')()['Engine'] = (function() { Engine.prototype['setOnExecute'] = Engine.prototype.setOnExecute; Engine.prototype['setOnExit'] = Engine.prototype.setOnExit; Engine.prototype['copyToFS'] = Engine.prototype.copyToFS; + Engine.prototype['setPersistentPaths'] = Engine.prototype.setPersistentPaths; return Engine; })(); diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp index 6a3a977cfb..a83ff44d20 100644 --- a/platform/javascript/export/export.cpp +++ b/platform/javascript/export/export.cpp @@ -124,6 +124,9 @@ public: String s = "HTTP/1.1 200 OK\r\n"; s += "Connection: Close\r\n"; s += "Content-Type: " + ctype + "\r\n"; + s += "Access-Control-Allow-Origin: *\r\n"; + s += "Cross-Origin-Opener-Policy: same-origin\r\n"; + s += "Cross-Origin-Embedder-Policy: require-corp\r\n"; s += "\r\n"; CharString cs = s.utf8(); Error err = connection->put_data((const uint8_t *)cs.get_data(), cs.size() - 1); @@ -258,6 +261,7 @@ void EditorExportPlatformJavaScript::_fix_html(Vector<uint8_t> &p_html, const Re current_line = current_line.replace("$GODOT_BASENAME", p_name); current_line = current_line.replace("$GODOT_PROJECT_NAME", ProjectSettings::get_singleton()->get_setting("application/config/name")); current_line = current_line.replace("$GODOT_HEAD_INCLUDE", p_preset->get("html/head_include")); + current_line = current_line.replace("$GODOT_FULL_WINDOW", p_preset->get("html/full_window_size") ? "true" : "false"); current_line = current_line.replace("$GODOT_DEBUG_ENABLED", p_debug ? "true" : "false"); current_line = current_line.replace("$GODOT_ARGS", flags_json); str_export += current_line + "\n"; @@ -291,6 +295,7 @@ void EditorExportPlatformJavaScript::get_export_options(List<ExportOption> *r_op r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "vram_texture_compression/for_mobile"), false)); // ETC or ETC2, depending on renderer r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "html/custom_html_shell", PROPERTY_HINT_FILE, "*.html"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "html/head_include", PROPERTY_HINT_MULTILINE_TEXT), "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "html/full_window_size"), true)); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), "")); } diff --git a/platform/javascript/godot_audio.h b/platform/javascript/godot_audio.h new file mode 100644 index 0000000000..f7f26e5262 --- /dev/null +++ b/platform/javascript/godot_audio.h @@ -0,0 +1,58 @@ +/*************************************************************************/ +/* godot_audio.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#ifndef GODOT_AUDIO_H +#define GODOT_AUDIO_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "stddef.h" + +extern int godot_audio_is_available(); + +extern int godot_audio_init(int p_mix_rate, int p_latency); +extern int godot_audio_create_processor(int p_buffer_length, int p_channel_count); + +extern void godot_audio_start(float *r_buffer_ptr); +extern void godot_audio_resume(); +extern void godot_audio_finish_async(); + +extern float godot_audio_get_latency(); + +extern void godot_audio_capture_start(); +extern void godot_audio_capture_stop(); + +#ifdef __cplusplus +} +#endif + +#endif /* GODOT_AUDIO_H */ diff --git a/platform/javascript/javascript_main.cpp b/platform/javascript/javascript_main.cpp index a30d84a52c..01722c4bc8 100644 --- a/platform/javascript/javascript_main.cpp +++ b/platform/javascript/javascript_main.cpp @@ -39,6 +39,17 @@ static OS_JavaScript *os = nullptr; static uint64_t target_ticks = 0; +extern "C" EMSCRIPTEN_KEEPALIVE void _request_quit_callback(char *p_filev[], int p_filec) { + DisplayServerJavaScript *ds = DisplayServerJavaScript::get_singleton(); + if (ds) { + Variant event = int(DisplayServer::WINDOW_EVENT_CLOSE_REQUEST); + Variant *eventp = &event; + Variant ret; + Callable::CallError ce; + ds->window_event_callback.call((const Variant **)&eventp, 1, ret, ce); + } +} + void exit_callback() { emscripten_cancel_main_loop(); // After this, we can exit! Main::cleanup(); @@ -77,12 +88,27 @@ void main_loop_callback() { /* clang-format on */ os->get_main_loop()->finish(); os->finalize_async(); // Will add all the async finish functions. + /* clang-format off */ EM_ASM({ Promise.all(Module.async_finish).then(function() { Module.async_finish = []; + return new Promise(function(accept, reject) { + if (!Module.idbfs) { + accept(); + return; + } + FS.syncfs(function(error) { + if (error) { + err('Failed to save IDB file system: ' + error.message); + } + accept(); + }); + }); + }).then(function() { ccall("cleanup_after_sync", null, []); }); }); + /* clang-format on */ } } @@ -90,31 +116,8 @@ extern "C" EMSCRIPTEN_KEEPALIVE void cleanup_after_sync() { emscripten_set_main_loop(exit_callback, -1, false); } -extern "C" EMSCRIPTEN_KEEPALIVE void main_after_fs_sync(char *p_idbfs_err) { - String idbfs_err = String::utf8(p_idbfs_err); - if (!idbfs_err.empty()) { - print_line("IndexedDB not available: " + idbfs_err); - } - os->set_idb_available(idbfs_err.empty()); - // TODO: Check error return value. - Main::setup2(); // Manual second phase. - // Ease up compatibility. - ResourceLoader::set_abort_on_missing_resources(false); - Main::start(); - os->get_main_loop()->init(); - // Immediately run the first iteration. - // We are inside an animation frame, we want to immediately draw on the newly setup canvas. - main_loop_callback(); - emscripten_resume_main_loop(); -} - +/// When calling main, it is assumed FS is setup and synced. int main(int argc, char *argv[]) { - // Create and mount userfs immediately. - EM_ASM({ - FS.mkdir('/userfs'); - FS.mount(IDBFS, {}, '/userfs'); - }); - // Configure locale. char locale_ptr[16]; /* clang-format off */ @@ -132,26 +135,30 @@ int main(int argc, char *argv[]) { /* clang-format on */ os = new OS_JavaScript(); + os->set_idb_available((bool)EM_ASM_INT({ return Module.idbfs })); // We must override main when testing is enabled TEST_MAIN_OVERRIDE - Main::setup(argv[0], argc - 1, &argv[1], false); - emscripten_set_main_loop(main_loop_callback, -1, false); - emscripten_pause_main_loop(); // Will need to wait for FS sync. + Main::setup(argv[0], argc - 1, &argv[1]); - // Sync from persistent state into memory and then - // run the 'main_after_fs_sync' function. + // Ease up compatibility. + ResourceLoader::set_abort_on_missing_resources(false); + + Main::start(); + os->get_main_loop()->init(); + // Expose method for requesting quit. /* clang-format off */ EM_ASM({ - FS.syncfs(true, function(err) { - requestAnimationFrame(function() { - ccall('main_after_fs_sync', null, ['string'], [err ? err.message : ""]); - }); - }); + Module['request_quit'] = function() { + ccall("_request_quit_callback", null, []); + }; }); /* clang-format on */ + emscripten_set_main_loop(main_loop_callback, -1, false); + // Immediately run the first iteration. + // We are inside an animation frame, we want to immediately draw on the newly setup canvas. + main_loop_callback(); return 0; - // Continued async in main_after_fs_sync() from the syncfs() callback. } diff --git a/platform/javascript/native/library_godot_audio.js b/platform/javascript/native/library_godot_audio.js new file mode 100644 index 0000000000..d300280ccd --- /dev/null +++ b/platform/javascript/native/library_godot_audio.js @@ -0,0 +1,173 @@ +/*************************************************************************/ +/* library_godot_audio.js */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +var GodotAudio = { + + $GodotAudio: { + + ctx: null, + input: null, + script: null, + }, + + godot_audio_is_available__proxy: 'sync', + godot_audio_is_available: function () { + if (!(window.AudioContext || window.webkitAudioContext)) { + return 0; + } + return 1; + }, + + godot_audio_init: function(mix_rate, latency) { + GodotAudio.ctx = new (window.AudioContext || window.webkitAudioContext)({ + sampleRate: mix_rate, + latencyHint: latency + }); + return GodotAudio.ctx.destination.channelCount; + }, + + godot_audio_create_processor: function(buffer_length, channel_count) { + GodotAudio.script = GodotAudio.ctx.createScriptProcessor(buffer_length, 2, channel_count); + GodotAudio.script.connect(GodotAudio.ctx.destination); + return GodotAudio.script.bufferSize; + }, + + godot_audio_start: function(buffer_ptr) { + var audioDriverProcessStart = cwrap('audio_driver_process_start'); + var audioDriverProcessEnd = cwrap('audio_driver_process_end'); + var audioDriverProcessCapture = cwrap('audio_driver_process_capture', null, ['number']); + GodotAudio.script.onaudioprocess = function(audioProcessingEvent) { + audioDriverProcessStart(); + + var input = audioProcessingEvent.inputBuffer; + var output = audioProcessingEvent.outputBuffer; + var internalBuffer = HEAPF32.subarray( + buffer_ptr / HEAPF32.BYTES_PER_ELEMENT, + buffer_ptr / HEAPF32.BYTES_PER_ELEMENT + output.length * output.numberOfChannels); + for (var channel = 0; channel < output.numberOfChannels; channel++) { + var outputData = output.getChannelData(channel); + // Loop through samples. + for (var sample = 0; sample < outputData.length; sample++) { + outputData[sample] = internalBuffer[sample * output.numberOfChannels + channel]; + } + } + + if (GodotAudio.input) { + var inputDataL = input.getChannelData(0); + var inputDataR = input.getChannelData(1); + for (var i = 0; i < inputDataL.length; i++) { + audioDriverProcessCapture(inputDataL[i]); + audioDriverProcessCapture(inputDataR[i]); + } + } + audioDriverProcessEnd(); + }; + }, + + godot_audio_resume: function() { + if (GodotAudio.ctx && GodotAudio.ctx.state != 'running') { + GodotAudio.ctx.resume(); + } + }, + + godot_audio_finish_async: function() { + Module.async_finish.push(new Promise(function(accept, reject) { + if (!GodotAudio.ctx) { + setTimeout(accept, 0); + } else { + if (GodotAudio.script) { + GodotAudio.script.disconnect(); + GodotAudio.script = null; + } + if (GodotAudio.input) { + GodotAudio.input.disconnect(); + GodotAudio.input = null; + } + GodotAudio.ctx.close().then(function() { + accept(); + }).catch(function(e) { + accept(); + }); + GodotAudio.ctx = null; + } + })); + }, + + godot_audio_get_latency__proxy: 'sync', + godot_audio_get_latency: function() { + var latency = 0; + if (GodotAudio.ctx) { + if (GodotAudio.ctx.baseLatency) { + latency += GodotAudio.ctx.baseLatency; + } + if (GodotAudio.ctx.outputLatency) { + latency += GodotAudio.ctx.outputLatency; + } + } + return latency; + }, + + godot_audio_capture_start__proxy: 'sync', + godot_audio_capture_start: function() { + if (GodotAudio.input) { + return; // Already started. + } + function gotMediaInput(stream) { + GodotAudio.input = GodotAudio.ctx.createMediaStreamSource(stream); + GodotAudio.input.connect(GodotAudio.script); + } + + function gotMediaInputError(e) { + out(e); + } + + if (navigator.mediaDevices.getUserMedia) { + navigator.mediaDevices.getUserMedia({"audio": true}).then(gotMediaInput, gotMediaInputError); + } else { + if (!navigator.getUserMedia) + navigator.getUserMedia = navigator.webkitGetUserMedia || navigator.mozGetUserMedia; + navigator.getUserMedia({"audio": true}, gotMediaInput, gotMediaInputError); + } + }, + + godot_audio_capture_stop__proxy: 'sync', + godot_audio_capture_stop: function() { + if (GodotAudio.input) { + const tracks = GodotAudio.input.mediaStream.getTracks(); + for (var i = 0; i < tracks.length; i++) { + tracks[i].stop(); + } + GodotAudio.input.disconnect(); + GodotAudio.input = null; + } + }, +}; + +autoAddDeps(GodotAudio, "$GodotAudio"); +mergeInto(LibraryManager.library, GodotAudio); diff --git a/platform/javascript/native/utils.js b/platform/javascript/native/utils.js index 95585d26ae..0b3698fd86 100644 --- a/platform/javascript/native/utils.js +++ b/platform/javascript/native/utils.js @@ -28,6 +28,38 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +Module['initFS'] = function(persistentPaths) { + FS.mkdir('/userfs'); + FS.mount(IDBFS, {}, '/userfs'); + + function createRecursive(dir) { + try { + FS.stat(dir); + } catch (e) { + if (e.errno !== ERRNO_CODES.ENOENT) { + throw e; + } + FS.mkdirTree(dir); + } + } + + persistentPaths.forEach(function(path) { + createRecursive(path); + FS.mount(IDBFS, {}, path); + }); + return new Promise(function(resolve, reject) { + FS.syncfs(true, function(err) { + if (err) { + Module.idbfs = false; + console.log("IndexedDB not available: " + err.message); + } else { + Module.idbfs = true; + } + resolve(err); + }); + }); +}; + Module['copyToFS'] = function(path, buffer) { var p = path.lastIndexOf("/"); var dir = "/"; @@ -37,7 +69,7 @@ Module['copyToFS'] = function(path, buffer) { try { FS.stat(dir); } catch (e) { - if (e.errno !== ERRNO_CODES.ENOENT) { // 'ENOENT', see https://github.com/emscripten-core/emscripten/blob/master/system/lib/libc/musl/arch/emscripten/bits/errno.h + if (e.errno !== ERRNO_CODES.ENOENT) { throw e; } FS.mkdirTree(dir); @@ -202,3 +234,44 @@ Module.drop_handler = (function() { }); } })(); + +function EventHandlers() { + function Handler(target, event, method, capture) { + this.target = target; + this.event = event; + this.method = method; + this.capture = capture; + } + + var listeners = []; + + function has(target, event, method, capture) { + return listeners.findIndex(function(e) { + return e.target === target && e.event === event && e.method === method && e.capture == capture; + }) !== -1; + } + + this.add = function(target, event, method, capture) { + if (has(target, event, method, capture)) { + return; + } + listeners.push(new Handler(target, event, method, capture)); + target.addEventListener(event, method, capture); + }; + + this.remove = function(target, event, method, capture) { + if (!has(target, event, method, capture)) { + return; + } + target.removeEventListener(event, method, capture); + }; + + this.clear = function() { + listeners.forEach(function(h) { + h.target.removeEventListener(h.event, h.method, h.capture); + }); + listeners.length = 0; + }; +} + +Module.listeners = new EventHandlers(); diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index 1ff4304bcf..cf5751f384 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -46,24 +46,6 @@ #include <emscripten.h> #include <stdlib.h> -bool OS_JavaScript::has_touchscreen_ui_hint() const { - /* clang-format off */ - return EM_ASM_INT_V( - return 'ontouchstart' in window; - ); - /* clang-format on */ -} - -// Audio - -int OS_JavaScript::get_audio_driver_count() const { - return 1; -} - -const char *OS_JavaScript::get_audio_driver_name(int p_driver) const { - return "JavaScript"; -} - // Lifecycle void OS_JavaScript::initialize() { OS_Unix::initialize_core(); @@ -90,27 +72,24 @@ MainLoop *OS_JavaScript::get_main_loop() const { return main_loop; } -void OS_JavaScript::main_loop_callback() { - get_singleton()->main_loop_iterate(); +extern "C" EMSCRIPTEN_KEEPALIVE void _idb_synced() { + OS_JavaScript::get_singleton()->idb_is_syncing = false; } bool OS_JavaScript::main_loop_iterate() { - if (is_userfs_persistent() && sync_wait_time >= 0) { - int64_t current_time = get_ticks_msec(); - int64_t elapsed_time = current_time - last_sync_check_time; - last_sync_check_time = current_time; - - sync_wait_time -= elapsed_time; - - if (sync_wait_time < 0) { - /* clang-format off */ - EM_ASM( - FS.syncfs(function(error) { - if (error) { err('Failed to save IDB file system: ' + error.message); } - }); - ); - /* clang-format on */ - } + if (is_userfs_persistent() && idb_needs_sync && !idb_is_syncing) { + idb_is_syncing = true; + idb_needs_sync = false; + /* clang-format off */ + EM_ASM({ + FS.syncfs(function(error) { + if (error) { + err('Failed to save IDB file system: ' + error.message); + } + ccall("_idb_synced", 'void', [], []); + }); + }); + /* clang-format on */ } DisplayServer::get_singleton()->process_events(); @@ -201,10 +180,6 @@ String OS_JavaScript::get_name() const { return "HTML5"; } -bool OS_JavaScript::can_draw() const { - return true; // Always? -} - String OS_JavaScript::get_user_data_dir() const { return "/userfs"; }; @@ -222,11 +197,17 @@ String OS_JavaScript::get_data_path() const { } void OS_JavaScript::file_access_close_callback(const String &p_file, int p_flags) { - OS_JavaScript *os = get_singleton(); - if (os->is_userfs_persistent() && p_file.begins_with("/userfs") && p_flags & FileAccess::WRITE) { - os->last_sync_check_time = OS::get_singleton()->get_ticks_msec(); - // Wait five seconds in case more files are about to be closed. - os->sync_wait_time = 5000; + OS_JavaScript *os = OS_JavaScript::get_singleton(); + if (!(os->is_userfs_persistent() && (p_flags & FileAccess::WRITE))) { + return; // FS persistence is not working or we are not writing. + } + bool is_file_persistent = p_file.begins_with("/userfs"); +#ifdef TOOLS_ENABLED + // Hack for editor persistence (can we track). + is_file_persistent = is_file_persistent || p_file.begins_with("/home/web_user/"); +#endif + if (is_file_persistent) { + os->idb_needs_sync = true; } } diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h index 22234f9355..85551d708b 100644 --- a/platform/javascript/os_javascript.h +++ b/platform/javascript/os_javascript.h @@ -44,57 +44,52 @@ class OS_JavaScript : public OS_Unix { bool finalizing = false; bool idb_available = false; - int64_t sync_wait_time = -1; - int64_t last_sync_check_time = -1; + bool idb_needs_sync = false; static void main_loop_callback(); static void file_access_close_callback(const String &p_file, int p_flags); protected: - virtual void initialize(); + void initialize() override; - virtual void set_main_loop(MainLoop *p_main_loop); - virtual void delete_main_loop(); + void set_main_loop(MainLoop *p_main_loop) override; + void delete_main_loop() override; - virtual void finalize(); + void finalize() override; - virtual bool _check_internal_feature_support(const String &p_feature); + bool _check_internal_feature_support(const String &p_feature) override; public: + bool idb_is_syncing = false; + // Override return type to make writing static callbacks less tedious. static OS_JavaScript *get_singleton(); - virtual void initialize_joypads(); - - virtual bool has_touchscreen_ui_hint() const; - - virtual int get_audio_driver_count() const; - virtual const char *get_audio_driver_name(int p_driver) const; + void initialize_joypads() override; - virtual MainLoop *get_main_loop() const; + MainLoop *get_main_loop() const override; void finalize_async(); bool main_loop_iterate(); - virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking = true, ProcessID *r_child_id = nullptr, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr); - virtual Error kill(const ProcessID &p_pid); - virtual int get_process_id() const; + Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking = true, ProcessID *r_child_id = nullptr, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr) override; + Error kill(const ProcessID &p_pid) override; + int get_process_id() const override; - String get_executable_path() const; - virtual Error shell_open(String p_uri); - virtual String get_name() const; + String get_executable_path() const override; + Error shell_open(String p_uri) override; + String get_name() const override; // Override default OS implementation which would block the main thread with delay_usec. // Implemented in javascript_main.cpp loop callback instead. - virtual void add_frame_delay(bool p_can_draw) {} - virtual bool can_draw() const; + void add_frame_delay(bool p_can_draw) override {} - virtual String get_cache_path() const; - virtual String get_config_path() const; - virtual String get_data_path() const; - virtual String get_user_data_dir() const; + String get_cache_path() const override; + String get_config_path() const override; + String get_data_path() const override; + String get_user_data_dir() const override; void set_idb_available(bool p_idb_available); - virtual bool is_userfs_persistent() const; + bool is_userfs_persistent() const override; void resume_audio(); bool is_finalizing() { return finalizing; } diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py index 3eb4c44bc1..f5e2c72bbc 100644 --- a/platform/linuxbsd/detect.py +++ b/platform/linuxbsd/detect.py @@ -35,6 +35,11 @@ def can_build(): print("xinerama not found.. x11 disabled.") return False + x11_error = os.system("pkg-config xext --modversion > /dev/null ") + if x11_error: + print("xext not found.. x11 disabled.") + return False + x11_error = os.system("pkg-config xrandr --modversion > /dev/null ") if x11_error: print("xrandr not found.. x11 disabled.") @@ -194,6 +199,7 @@ def configure(env): env.ParseConfig("pkg-config x11 --cflags --libs") env.ParseConfig("pkg-config xcursor --cflags --libs") env.ParseConfig("pkg-config xinerama --cflags --libs") + env.ParseConfig("pkg-config xext --cflags --libs") env.ParseConfig("pkg-config xrandr --cflags --libs") env.ParseConfig("pkg-config xrender --cflags --libs") env.ParseConfig("pkg-config xi --cflags --libs") diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp index fe9e253cc9..8b0d08d1cb 100644 --- a/platform/linuxbsd/display_server_x11.cpp +++ b/platform/linuxbsd/display_server_x11.cpp @@ -50,6 +50,7 @@ #include <X11/Xatom.h> #include <X11/Xutil.h> #include <X11/extensions/Xinerama.h> +#include <X11/extensions/shape.h> // ICCCM #define WM_NormalState 1L // window normal state @@ -321,23 +322,19 @@ bool DisplayServerX11::_refresh_device_info() { } void DisplayServerX11::_flush_mouse_motion() { - while (true) { - if (XPending(x11_display) > 0) { - XEvent event; - XPeekEvent(x11_display, &event); - - if (XGetEventData(x11_display, &event.xcookie) && event.xcookie.type == GenericEvent && event.xcookie.extension == xi.opcode) { - XIDeviceEvent *event_data = (XIDeviceEvent *)event.xcookie.data; - - if (event_data->evtype == XI_RawMotion) { - XNextEvent(x11_display, &event); - } else { - break; - } - } else { - break; + // Block events polling while flushing motion events. + MutexLock mutex_lock(events_mutex); + + for (uint32_t event_index = 0; event_index < polled_events.size(); ++event_index) { + XEvent &event = polled_events[event_index]; + if (XGetEventData(x11_display, &event.xcookie) && event.xcookie.type == GenericEvent && event.xcookie.extension == xi.opcode) { + XIDeviceEvent *event_data = (XIDeviceEvent *)event.xcookie.data; + if (event_data->evtype == XI_RawMotion) { + XFreeEventData(x11_display, &event.xcookie); + polled_events.remove(event_index--); + continue; } - } else { + XFreeEventData(x11_display, &event.xcookie); break; } } @@ -450,12 +447,25 @@ int DisplayServerX11::mouse_get_button_state() const { void DisplayServerX11::clipboard_set(const String &p_text) { _THREAD_SAFE_METHOD_ - internal_clipboard = p_text; + { + // The clipboard content can be accessed while polling for events. + MutexLock mutex_lock(events_mutex); + internal_clipboard = p_text; + } + XSetSelectionOwner(x11_display, XA_PRIMARY, windows[MAIN_WINDOW_ID].x11_window, CurrentTime); XSetSelectionOwner(x11_display, XInternAtom(x11_display, "CLIPBOARD", 0), windows[MAIN_WINDOW_ID].x11_window, CurrentTime); } -static String _clipboard_get_impl(Atom p_source, Window x11_window, ::Display *x11_display, String p_internal_clipboard, Atom target) { +Bool DisplayServerX11::_predicate_clipboard_selection(Display *display, XEvent *event, XPointer arg) { + if (event->type == SelectionNotify && event->xselection.requestor == *(Window *)arg) { + return True; + } else { + return False; + } +} + +String DisplayServerX11::_clipboard_get_impl(Atom p_source, Window x11_window, Atom target) const { String ret; Atom type; @@ -463,23 +473,27 @@ static String _clipboard_get_impl(Atom p_source, Window x11_window, ::Display *x int format, result; unsigned long len, bytes_left, dummy; unsigned char *data; - Window Sown = XGetSelectionOwner(x11_display, p_source); + Window selection_owner = XGetSelectionOwner(x11_display, p_source); - if (Sown == x11_window) { - return p_internal_clipboard; - }; + if (selection_owner == x11_window) { + return internal_clipboard; + } - if (Sown != None) { - XConvertSelection(x11_display, p_source, target, selection, - x11_window, CurrentTime); - XFlush(x11_display); - while (true) { + if (selection_owner != None) { + { + // Block events polling while processing selection events. + MutexLock mutex_lock(events_mutex); + + XConvertSelection(x11_display, p_source, target, selection, + x11_window, CurrentTime); + + XFlush(x11_display); + + // Blocking wait for predicate to be True + // and remove the event from the queue. XEvent event; - XNextEvent(x11_display, &event); - if (event.type == SelectionNotify && event.xselection.requestor == x11_window) { - break; - }; - }; + XIfEvent(x11_display, &event, _predicate_clipboard_selection, (XPointer)&x11_window); + } // // Do not get any data, see how much data is there @@ -513,14 +527,14 @@ static String _clipboard_get_impl(Atom p_source, Window x11_window, ::Display *x return ret; } -static String _clipboard_get(Atom p_source, Window x11_window, ::Display *x11_display, String p_internal_clipboard) { +String DisplayServerX11::_clipboard_get(Atom p_source, Window x11_window) const { String ret; Atom utf8_atom = XInternAtom(x11_display, "UTF8_STRING", True); if (utf8_atom != None) { - ret = _clipboard_get_impl(p_source, x11_window, x11_display, p_internal_clipboard, utf8_atom); + ret = _clipboard_get_impl(p_source, x11_window, utf8_atom); } - if (ret == "") { - ret = _clipboard_get_impl(p_source, x11_window, x11_display, p_internal_clipboard, XA_STRING); + if (ret.empty()) { + ret = _clipboard_get_impl(p_source, x11_window, XA_STRING); } return ret; } @@ -529,11 +543,11 @@ String DisplayServerX11::clipboard_get() const { _THREAD_SAFE_METHOD_ String ret; - ret = _clipboard_get(XInternAtom(x11_display, "CLIPBOARD", 0), windows[MAIN_WINDOW_ID].x11_window, x11_display, internal_clipboard); + ret = _clipboard_get(XInternAtom(x11_display, "CLIPBOARD", 0), windows[MAIN_WINDOW_ID].x11_window); - if (ret == "") { - ret = _clipboard_get(XA_PRIMARY, windows[MAIN_WINDOW_ID].x11_window, x11_display, internal_clipboard); - }; + if (ret.empty()) { + ret = _clipboard_get(XA_PRIMARY, windows[MAIN_WINDOW_ID].x11_window); + } return ret; } @@ -782,6 +796,38 @@ void DisplayServerX11::window_set_title(const String &p_title, WindowID p_window XChangeProperty(x11_display, wd.x11_window, _net_wm_name, utf8_string, 8, PropModeReplace, (unsigned char *)p_title.utf8().get_data(), p_title.utf8().length()); } +void DisplayServerX11::window_set_mouse_passthrough(const Vector<Vector2> &p_region, WindowID p_window) { + _THREAD_SAFE_METHOD_ + + ERR_FAIL_COND(!windows.has(p_window)); + const WindowData &wd = windows[p_window]; + + int event_base, error_base; + const Bool ext_okay = XShapeQueryExtension(x11_display, &event_base, &error_base); + if (ext_okay) { + Region region; + if (p_region.size() == 0) { + region = XCreateRegion(); + XRectangle rect; + rect.x = 0; + rect.y = 0; + rect.width = window_get_real_size(p_window).x; + rect.height = window_get_real_size(p_window).y; + XUnionRectWithRegion(&rect, region, region); + } else { + XPoint *points = (XPoint *)memalloc(sizeof(XPoint) * p_region.size()); + for (int i = 0; i < p_region.size(); i++) { + points[i].x = p_region[i].x; + points[i].y = p_region[i].y; + } + region = XPolygonRegion(points, p_region.size(), EvenOddRule); + memfree(points); + } + XShapeCombineRegion(x11_display, wd.x11_window, ShapeInput, 0, 0, region, ShapeSet); + XDestroyRegion(region); + } +} + void DisplayServerX11::window_set_rect_changed_callback(const Callable &p_callable, WindowID p_window) { _THREAD_SAFE_METHOD_ @@ -1616,10 +1662,16 @@ void DisplayServerX11::window_set_ime_active(const bool p_active, WindowID p_win return; } + // Block events polling while changing input focus + // because it triggers some event polling internally. if (p_active) { - XSetICFocus(wd.xic); + { + MutexLock mutex_lock(events_mutex); + XSetICFocus(wd.xic); + } window_set_ime_position(wd.im_position, p_window); } else { + MutexLock mutex_lock(events_mutex); XUnsetICFocus(wd.xic); } } @@ -1640,7 +1692,14 @@ void DisplayServerX11::window_set_ime_position(const Point2i &p_pos, WindowID p_ spot.x = short(p_pos.x); spot.y = short(p_pos.y); XVaNestedList preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &spot, nullptr); - XSetICValues(wd.xic, XNPreeditAttributes, preedit_attr, nullptr); + + { + // Block events polling during this call + // because it triggers some event polling internally. + MutexLock mutex_lock(events_mutex); + XSetICValues(wd.xic, XNPreeditAttributes, preedit_attr, nullptr); + } + XFree(preedit_attr); } @@ -1960,7 +2019,7 @@ unsigned int DisplayServerX11::_get_mouse_button_state(unsigned int p_x11_button return last_button_state; } -void DisplayServerX11::_handle_key_event(WindowID p_window, XKeyEvent *p_event, bool p_echo) { +void DisplayServerX11::_handle_key_event(WindowID p_window, XKeyEvent *p_event, LocalVector<XEvent> &p_events, uint32_t &p_event_index, bool p_echo) { WindowData wd = windows[p_window]; // X11 functions don't know what const is XKeyEvent *xkeyevent = p_event; @@ -2097,7 +2156,7 @@ void DisplayServerX11::_handle_key_event(WindowID p_window, XKeyEvent *p_event, /* Phase 4, determine if event must be filtered */ // This seems to be a side-effect of using XIM. - // XEventFilter looks like a core X11 function, + // XFilterEvent looks like a core X11 function, // but it's actually just used to see if we must // ignore a deadkey, or events XIM determines // must not reach the actual gui. @@ -2131,17 +2190,16 @@ void DisplayServerX11::_handle_key_event(WindowID p_window, XKeyEvent *p_event, // Echo characters in X11 are a keyrelease and a keypress // one after the other with the (almot) same timestamp. - // To detect them, i use XPeekEvent and check that their - // difference in time is below a threshold. + // To detect them, i compare to the next event in list and + // check that their difference in time is below a threshold. if (xkeyevent->type != KeyPress) { p_echo = false; // make sure there are events pending, // so this call won't block. - if (XPending(x11_display) > 0) { - XEvent peek_event; - XPeekEvent(x11_display, &peek_event); + if (p_event_index + 1 < p_events.size()) { + XEvent &peek_event = p_events[p_event_index + 1]; // I'm using a threshold of 5 msecs, // since sometimes there seems to be a little @@ -2156,9 +2214,9 @@ void DisplayServerX11::_handle_key_event(WindowID p_window, XKeyEvent *p_event, KeySym rk; XLookupString((XKeyEvent *)&peek_event, str, 256, &rk, nullptr); if (rk == keysym_keycode) { - XEvent event; - XNextEvent(x11_display, &event); //erase next event - _handle_key_event(p_window, (XKeyEvent *)&event, true); + // Consume to next event. + ++p_event_index; + _handle_key_event(p_window, (XKeyEvent *)&peek_event, p_events, p_event_index, true); return; //ignore current, echo next } } @@ -2213,6 +2271,66 @@ void DisplayServerX11::_handle_key_event(WindowID p_window, XKeyEvent *p_event, Input::get_singleton()->accumulate_input_event(k); } +void DisplayServerX11::_handle_selection_request_event(XSelectionRequestEvent *p_event) { + XEvent respond; + if (p_event->target == XInternAtom(x11_display, "UTF8_STRING", 0) || + p_event->target == XInternAtom(x11_display, "COMPOUND_TEXT", 0) || + p_event->target == XInternAtom(x11_display, "TEXT", 0) || + p_event->target == XA_STRING || + p_event->target == XInternAtom(x11_display, "text/plain;charset=utf-8", 0) || + p_event->target == XInternAtom(x11_display, "text/plain", 0)) { + // Directly using internal clipboard because we know our window + // is the owner during a selection request. + CharString clip = internal_clipboard.utf8(); + XChangeProperty(x11_display, + p_event->requestor, + p_event->property, + p_event->target, + 8, + PropModeReplace, + (unsigned char *)clip.get_data(), + clip.length()); + respond.xselection.property = p_event->property; + } else if (p_event->target == XInternAtom(x11_display, "TARGETS", 0)) { + Atom data[7]; + data[0] = XInternAtom(x11_display, "TARGETS", 0); + data[1] = XInternAtom(x11_display, "UTF8_STRING", 0); + data[2] = XInternAtom(x11_display, "COMPOUND_TEXT", 0); + data[3] = XInternAtom(x11_display, "TEXT", 0); + data[4] = XA_STRING; + data[5] = XInternAtom(x11_display, "text/plain;charset=utf-8", 0); + data[6] = XInternAtom(x11_display, "text/plain", 0); + + XChangeProperty(x11_display, + p_event->requestor, + p_event->property, + XA_ATOM, + 32, + PropModeReplace, + (unsigned char *)&data, + sizeof(data) / sizeof(data[0])); + respond.xselection.property = p_event->property; + + } else { + char *targetname = XGetAtomName(x11_display, p_event->target); + printf("No Target '%s'\n", targetname); + if (targetname) { + XFree(targetname); + } + respond.xselection.property = None; + } + + respond.xselection.type = SelectionNotify; + respond.xselection.display = p_event->display; + respond.xselection.requestor = p_event->requestor; + respond.xselection.selection = p_event->selection; + respond.xselection.target = p_event->target; + respond.xselection.time = p_event->time; + + XSendEvent(x11_display, p_event->requestor, True, NoEventMask, &respond); + XFlush(x11_display); +} + void DisplayServerX11::_xim_destroy_callback(::XIM im, ::XPointer client_data, ::XPointer call_data) { WARN_PRINT("Input method stopped"); @@ -2325,6 +2443,65 @@ void DisplayServerX11::_send_window_event(const WindowData &wd, WindowEvent p_ev } } +void DisplayServerX11::_poll_events_thread(void *ud) { + DisplayServerX11 *display_server = (DisplayServerX11 *)ud; + display_server->_poll_events(); +} + +Bool DisplayServerX11::_predicate_all_events(Display *display, XEvent *event, XPointer arg) { + // Just accept all events. + return True; +} + +void DisplayServerX11::_poll_events() { + int x11_fd = ConnectionNumber(x11_display); + fd_set in_fds; + + while (!events_thread_done) { + XFlush(x11_display); + + FD_ZERO(&in_fds); + FD_SET(x11_fd, &in_fds); + + struct timeval tv; + tv.tv_usec = 0; + tv.tv_sec = 1; + + // Wait for next event or timeout. + int num_ready_fds = select(x11_fd + 1, &in_fds, NULL, NULL, &tv); + if (num_ready_fds < 0) { + ERR_PRINT("_poll_events: select error: " + itos(errno)); + } + + // Process events from the queue. + { + MutexLock mutex_lock(events_mutex); + + // Non-blocking wait for next event + // and remove it from the queue. + XEvent ev; + while (XCheckIfEvent(x11_display, &ev, _predicate_all_events, nullptr)) { + // Check if the input manager wants to process the event. + if (XFilterEvent(&ev, None)) { + // Event has been filtered by the Input Manager, + // it has to be ignored and a new one will be received. + continue; + } + + // Handle selection request events directly in the event thread, because + // communication through the x server takes several events sent back and forth + // and we don't want to block other programs while processing only one each frame. + if (ev.type == SelectionRequest) { + _handle_selection_request_event(&(ev.xselectionrequest)); + continue; + } + + polled_events.push_back(ev); + } + } + } +} + void DisplayServerX11::process_events() { _THREAD_SAFE_METHOD_ @@ -2368,13 +2545,16 @@ void DisplayServerX11::process_events() { xi.tilt = Vector2(); xi.pressure_supported = false; - while (XPending(x11_display) > 0) { - XEvent event; - XNextEvent(x11_display, &event); + LocalVector<XEvent> events; + { + // Block events polling while flushing events. + MutexLock mutex_lock(events_mutex); + events = polled_events; + polled_events.clear(); + } - if (XFilterEvent(&event, None)) { - continue; - } + for (uint32_t event_index = 0; event_index < events.size(); ++event_index) { + XEvent &event = events[event_index]; WindowID window_id = MAIN_WINDOW_ID; @@ -2633,6 +2813,9 @@ void DisplayServerX11::process_events() { }*/ #endif if (wd.xic) { + // Block events polling while changing input focus + // because it triggers some event polling internally. + MutexLock mutex_lock(events_mutex); XSetICFocus(wd.xic); } @@ -2682,7 +2865,10 @@ void DisplayServerX11::process_events() { xi.state.clear(); #endif if (wd.xic) { - XSetICFocus(wd.xic); + // Block events polling while changing input focus + // because it triggers some event polling internally. + MutexLock mutex_lock(events_mutex); + XUnsetICFocus(wd.xic); } } break; @@ -2801,11 +2987,11 @@ void DisplayServerX11::process_events() { break; } - if (XPending(x11_display) > 0) { - XEvent tevent; - XPeekEvent(x11_display, &tevent); - if (tevent.type == MotionNotify) { - XNextEvent(x11_display, &event); + if (event_index + 1 < events.size()) { + const XEvent &next_event = events[event_index + 1]; + if (next_event.type == MotionNotify) { + ++event_index; + event = next_event; } else { break; } @@ -2936,67 +3122,7 @@ void DisplayServerX11::process_events() { // key event is a little complex, so // it will be handled in its own function. - _handle_key_event(window_id, (XKeyEvent *)&event); - } break; - case SelectionRequest: { - XSelectionRequestEvent *req; - XEvent e, respond; - e = event; - - req = &(e.xselectionrequest); - if (req->target == XInternAtom(x11_display, "UTF8_STRING", 0) || - req->target == XInternAtom(x11_display, "COMPOUND_TEXT", 0) || - req->target == XInternAtom(x11_display, "TEXT", 0) || - req->target == XA_STRING || - req->target == XInternAtom(x11_display, "text/plain;charset=utf-8", 0) || - req->target == XInternAtom(x11_display, "text/plain", 0)) { - CharString clip = clipboard_get().utf8(); - XChangeProperty(x11_display, - req->requestor, - req->property, - req->target, - 8, - PropModeReplace, - (unsigned char *)clip.get_data(), - clip.length()); - respond.xselection.property = req->property; - } else if (req->target == XInternAtom(x11_display, "TARGETS", 0)) { - Atom data[7]; - data[0] = XInternAtom(x11_display, "TARGETS", 0); - data[1] = XInternAtom(x11_display, "UTF8_STRING", 0); - data[2] = XInternAtom(x11_display, "COMPOUND_TEXT", 0); - data[3] = XInternAtom(x11_display, "TEXT", 0); - data[4] = XA_STRING; - data[5] = XInternAtom(x11_display, "text/plain;charset=utf-8", 0); - data[6] = XInternAtom(x11_display, "text/plain", 0); - - XChangeProperty(x11_display, - req->requestor, - req->property, - XA_ATOM, - 32, - PropModeReplace, - (unsigned char *)&data, - sizeof(data) / sizeof(data[0])); - respond.xselection.property = req->property; - - } else { - char *targetname = XGetAtomName(x11_display, req->target); - printf("No Target '%s'\n", targetname); - if (targetname) { - XFree(targetname); - } - respond.xselection.property = None; - } - - respond.xselection.type = SelectionNotify; - respond.xselection.display = req->display; - respond.xselection.requestor = req->requestor; - respond.xselection.selection = req->selection; - respond.xselection.target = req->target; - respond.xselection.time = req->time; - XSendEvent(x11_display, req->requestor, True, NoEventMask, &respond); - XFlush(x11_display); + _handle_key_event(window_id, (XKeyEvent *)&event, events, event_index); } break; case SelectionNotify: @@ -3391,6 +3517,10 @@ DisplayServerX11::WindowID DisplayServerX11::_create_window(WindowMode p_mode, u XChangeProperty(x11_display, wd.x11_window, xdnd_aware, XA_ATOM, 32, PropModeReplace, (unsigned char *)&xdnd_version, 1); if (xim && xim_style) { + // Block events polling while changing input focus + // because it triggers some event polling internally. + MutexLock mutex_lock(events_mutex); + wd.xic = XCreateIC(xim, XNInputStyle, xim_style, XNClientWindow, wd.x11_window, XNFocusWindow, wd.x11_window, (char *)nullptr); if (XGetICValues(wd.xic, XNFilterEvents, &im_event_mask, nullptr) != nullptr) { WARN_PRINT("XGetICValues couldn't obtain XNFilterEvents value"); @@ -3542,7 +3672,12 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode xrandr_handle = dlopen("libXrandr.so.2", RTLD_LAZY); if (!xrandr_handle) { err = dlerror(); - fprintf(stderr, "could not load libXrandr.so.2, Error: %s\n", err); + // For some arcane reason, NetBSD now ships libXrandr.so.3 while the rest of the world has libXrandr.so.2... + // In case this happens for other X11 platforms in the future, let's give it a try too before failing. + xrandr_handle = dlopen("libXrandr.so.3", RTLD_LAZY); + if (!xrandr_handle) { + fprintf(stderr, "could not load libXrandr.so.2, Error: %s\n", err); + } } else { XRRQueryVersion(x11_display, &xrandr_major, &xrandr_minor); if (((xrandr_major << 8) | xrandr_minor) >= 0x0105) { @@ -3888,12 +4023,19 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode } } + events_thread = Thread::create(_poll_events_thread, this); + _update_real_mouse_position(windows[MAIN_WINDOW_ID]); r_error = OK; } DisplayServerX11::~DisplayServerX11() { + events_thread_done = true; + Thread::wait_to_finish(events_thread); + memdelete(events_thread); + events_thread = nullptr; + //destroy all windows for (Map<WindowID, WindowData>::Element *E = windows.front(); E; E = E->next()) { #ifdef VULKAN_ENABLED diff --git a/platform/linuxbsd/display_server_x11.h b/platform/linuxbsd/display_server_x11.h index 57cee910a0..740bf81fd9 100644 --- a/platform/linuxbsd/display_server_x11.h +++ b/platform/linuxbsd/display_server_x11.h @@ -36,6 +36,7 @@ #include "servers/display_server.h" #include "core/input/input.h" +#include "core/local_vector.h" #include "drivers/alsa/audio_driver_alsa.h" #include "drivers/alsamidi/midi_driver_alsamidi.h" #include "drivers/pulseaudio/audio_driver_pulseaudio.h" @@ -202,7 +203,11 @@ class DisplayServerX11 : public DisplayServer { MouseMode mouse_mode; Point2i center; - void _handle_key_event(WindowID p_window, XKeyEvent *p_event, bool p_echo = false); + void _handle_key_event(WindowID p_window, XKeyEvent *p_event, LocalVector<XEvent> &p_events, uint32_t &p_event_index, bool p_echo = false); + void _handle_selection_request_event(XSelectionRequestEvent *p_event); + + String _clipboard_get_impl(Atom p_source, Window x11_window, Atom target) const; + String _clipboard_get(Atom p_source, Window x11_window) const; //bool minimized; //bool window_has_focus; @@ -252,6 +257,16 @@ class DisplayServerX11 : public DisplayServer { static void _dispatch_input_events(const Ref<InputEvent> &p_event); void _dispatch_input_event(const Ref<InputEvent> &p_event); + mutable Mutex events_mutex; + Thread *events_thread = nullptr; + bool events_thread_done = false; + LocalVector<XEvent> polled_events; + static void _poll_events_thread(void *ud); + void _poll_events(); + + static Bool _predicate_all_events(Display *display, XEvent *event, XPointer arg); + static Bool _predicate_clipboard_selection(Display *display, XEvent *event, XPointer arg); + protected: void _window_changed(XEvent *event); @@ -291,6 +306,8 @@ public: virtual ObjectID window_get_attached_instance_id(WindowID p_window = MAIN_WINDOW_ID) const; virtual void window_set_title(const String &p_title, WindowID p_window = MAIN_WINDOW_ID); + virtual void window_set_mouse_passthrough(const Vector<Vector2> &p_region, WindowID p_window = MAIN_WINDOW_ID); + virtual void window_set_rect_changed_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID); virtual void window_set_window_event_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID); virtual void window_set_input_event_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID); diff --git a/platform/linuxbsd/platform_config.h b/platform/linuxbsd/platform_config.h index 764666681f..571ad03db0 100644 --- a/platform/linuxbsd/platform_config.h +++ b/platform/linuxbsd/platform_config.h @@ -31,7 +31,15 @@ #ifdef __linux__ #include <alloca.h> #endif -#if defined(__FreeBSD__) || defined(__OpenBSD__) -#include <stdlib.h> + +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) +#include <stdlib.h> // alloca +// FreeBSD and OpenBSD use pthread_set_name_np, while other platforms, +// include NetBSD, use pthread_setname_np. NetBSD's version however requires +// a different format, we handle this directly in thread_posix. +#ifdef __NetBSD__ +#define PTHREAD_NETBSD_SET_NAME +#else #define PTHREAD_BSD_SET_NAME #endif +#endif diff --git a/platform/osx/dir_access_osx.h b/platform/osx/dir_access_osx.h index d61ee181f0..91b8f9b2c5 100644 --- a/platform/osx/dir_access_osx.h +++ b/platform/osx/dir_access_osx.h @@ -47,6 +47,8 @@ protected: virtual int get_drive_count(); virtual String get_drive(int p_drive); + + virtual bool is_hidden(const String &p_name); }; #endif //UNIX ENABLED diff --git a/platform/osx/dir_access_osx.mm b/platform/osx/dir_access_osx.mm index 7791ba5407..439c6a075f 100644 --- a/platform/osx/dir_access_osx.mm +++ b/platform/osx/dir_access_osx.mm @@ -68,4 +68,14 @@ String DirAccessOSX::get_drive(int p_drive) { return volname; } +bool DirAccessOSX::is_hidden(const String &p_name) { + String f = get_current_dir().plus_file(p_name); + NSURL *url = [NSURL fileURLWithPath:@(f.utf8().get_data())]; + NSNumber *hidden = nil; + if (![url getResourceValue:&hidden forKey:NSURLIsHiddenKey error:nil]) { + return DirAccessUnix::is_hidden(p_name); + } + return [hidden boolValue]; +} + #endif //posix_enabled diff --git a/platform/osx/display_server_osx.h b/platform/osx/display_server_osx.h index d8f3f81ff6..073d35008b 100644 --- a/platform/osx/display_server_osx.h +++ b/platform/osx/display_server_osx.h @@ -102,6 +102,8 @@ public: id window_object; id window_view; + Vector<Vector2> mpath; + #if defined(OPENGL_ENABLED) ContextGL_OSX *context_gles2 = nullptr; #endif @@ -240,6 +242,7 @@ public: virtual void window_set_drop_files_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override; virtual void window_set_title(const String &p_title, WindowID p_window = MAIN_WINDOW_ID) override; + virtual void window_set_mouse_passthrough(const Vector<Vector2> &p_region, WindowID p_window = MAIN_WINDOW_ID) override; virtual int window_get_current_screen(WindowID p_window = MAIN_WINDOW_ID) const override; virtual void window_set_current_screen(int p_screen, WindowID p_window = MAIN_WINDOW_ID) override; diff --git a/platform/osx/display_server_osx.mm b/platform/osx/display_server_osx.mm index adfb47324e..cd5b71890c 100644 --- a/platform/osx/display_server_osx.mm +++ b/platform/osx/display_server_osx.mm @@ -33,6 +33,7 @@ #include "os_osx.h" #include "core/io/marshalls.h" +#include "core/math/geometry_2d.h" #include "core/os/keyboard.h" #include "main/main.h" #include "scene/resources/texture.h" @@ -2040,6 +2041,12 @@ void DisplayServerOSX::mouse_set_mode(MouseMode p_mode) { CGDisplayHideCursor(kCGDirectMainDisplay); } CGAssociateMouseAndMouseCursorPosition(false); + WindowData &wd = windows[MAIN_WINDOW_ID]; + const NSRect contentRect = [wd.window_view frame]; + NSRect pointInWindowRect = NSMakeRect(contentRect.size.width / 2, contentRect.size.height / 2, 0, 0); + NSPoint pointOnScreen = [[wd.window_view window] convertRectToScreen:pointInWindowRect].origin; + CGPoint lMouseWarpPos = { pointOnScreen.x, CGDisplayBounds(CGMainDisplayID()).size.height - pointOnScreen.y }; + CGWarpMouseCursorPosition(lMouseWarpPos); } else if (p_mode == MOUSE_MODE_HIDDEN) { if (mouse_mode == MOUSE_MODE_VISIBLE || mouse_mode == MOUSE_MODE_CONFINED) { CGDisplayHideCursor(kCGDirectMainDisplay); @@ -2239,11 +2246,18 @@ int DisplayServerOSX::screen_get_dpi(int p_screen) const { NSArray *screenArray = [NSScreen screens]; if ((NSUInteger)p_screen < [screenArray count]) { NSDictionary *description = [[screenArray objectAtIndex:p_screen] deviceDescription]; - NSSize displayDPI = [[description objectForKey:NSDeviceResolution] sizeValue]; - return (displayDPI.width + displayDPI.height) / 2; + + const NSSize displayPixelSize = [[description objectForKey:NSDeviceSize] sizeValue]; + const CGSize displayPhysicalSize = CGDisplayScreenSize([[description objectForKey:@"NSScreenNumber"] unsignedIntValue]); + float scale = [[screenArray objectAtIndex:p_screen] backingScaleFactor]; + + float den2 = (displayPhysicalSize.width / 25.4f) * (displayPhysicalSize.width / 25.4f) + (displayPhysicalSize.height / 25.4f) * (displayPhysicalSize.height / 25.4f); + if (den2 > 0.0f) { + return ceil(sqrt(displayPixelSize.width * displayPixelSize.width + displayPixelSize.height * displayPixelSize.height) / sqrt(den2) * scale); + } } - return 96; + return 72; } float DisplayServerOSX::screen_get_scale(int p_screen) const { @@ -2404,6 +2418,15 @@ void DisplayServerOSX::window_set_title(const String &p_title, WindowID p_window [wd.window_object setTitle:[NSString stringWithUTF8String:p_title.utf8().get_data()]]; } +void DisplayServerOSX::window_set_mouse_passthrough(const Vector<Vector2> &p_region, WindowID p_window) { + _THREAD_SAFE_METHOD_ + + ERR_FAIL_COND(!windows.has(p_window)); + WindowData &wd = windows[p_window]; + + wd.mpath = p_region; +} + void DisplayServerOSX::window_set_rect_changed_callback(const Callable &p_callable, WindowID p_window) { _THREAD_SAFE_METHOD_ @@ -3356,6 +3379,26 @@ void DisplayServerOSX::process_events() { Input::get_singleton()->flush_accumulated_events(); } + for (Map<WindowID, WindowData>::Element *E = windows.front(); E; E = E->next()) { + WindowData &wd = E->get(); + if (wd.mpath.size() > 0) { + const Vector2 mpos = _get_mouse_pos(wd, [wd.window_object mouseLocationOutsideOfEventStream]); + if (Geometry2D::is_point_in_polygon(mpos, wd.mpath)) { + if ([wd.window_object ignoresMouseEvents]) { + [wd.window_object setIgnoresMouseEvents:NO]; + } + } else { + if (![wd.window_object ignoresMouseEvents]) { + [wd.window_object setIgnoresMouseEvents:YES]; + } + } + } else { + if ([wd.window_object ignoresMouseEvents]) { + [wd.window_object setIgnoresMouseEvents:NO]; + } + } + } + [autoreleasePool drain]; autoreleasePool = [[NSAutoreleasePool alloc] init]; } diff --git a/platform/server/platform_config.h b/platform/server/platform_config.h index bdff93f02b..73136ec81b 100644 --- a/platform/server/platform_config.h +++ b/platform/server/platform_config.h @@ -31,10 +31,19 @@ #if defined(__linux__) || defined(__APPLE__) #include <alloca.h> #endif -#if defined(__FreeBSD__) || defined(__OpenBSD__) -#include <stdlib.h> + +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) +#include <stdlib.h> // alloca +// FreeBSD and OpenBSD use pthread_set_name_np, while other platforms, +// include NetBSD, use pthread_setname_np. NetBSD's version however requires +// a different format, we handle this directly in thread_posix. +#ifdef __NetBSD__ +#define PTHREAD_NETBSD_SET_NAME +#else #define PTHREAD_BSD_SET_NAME #endif +#endif + #ifdef __APPLE__ #define PTHREAD_RENAME_SELF #endif diff --git a/platform/uwp/detect.py b/platform/uwp/detect.py index 04b743f2c8..a7ca26c16c 100644 --- a/platform/uwp/detect.py +++ b/platform/uwp/detect.py @@ -65,12 +65,14 @@ def configure(env): env.Append(CCFLAGS=["/MD"]) env.Append(CPPDEFINES=["DEBUG_ENABLED"]) env.Append(LINKFLAGS=["/SUBSYSTEM:CONSOLE"]) + env.AppendUnique(CPPDEFINES=["WINDOWS_SUBSYSTEM_CONSOLE"]) elif env["target"] == "debug": env.Append(CCFLAGS=["/Zi"]) env.Append(CCFLAGS=["/MDd"]) env.Append(CPPDEFINES=["DEBUG_ENABLED"]) env.Append(LINKFLAGS=["/SUBSYSTEM:CONSOLE"]) + env.AppendUnique(CPPDEFINES=["WINDOWS_SUBSYSTEM_CONSOLE"]) env.Append(LINKFLAGS=["/DEBUG"]) ## Compiler configuration diff --git a/platform/windows/SCsub b/platform/windows/SCsub index daffe59f34..e3f86977a4 100644 --- a/platform/windows/SCsub +++ b/platform/windows/SCsub @@ -26,10 +26,10 @@ prog = env.add_program("#bin/godot", common_win + res_obj, PROGSUFFIX=env["PROGS # Microsoft Visual Studio Project Generation if env["vsproj"]: - env.vs_srcs = env.vs_srcs + ["platform/windows/" + res_file] - env.vs_srcs = env.vs_srcs + ["platform/windows/godot.natvis"] + env.vs_srcs += ["platform/windows/" + res_file] + env.vs_srcs += ["platform/windows/godot.natvis"] for x in common_win: - env.vs_srcs = env.vs_srcs + ["platform/windows/" + str(x)] + env.vs_srcs += ["platform/windows/" + str(x)] if not os.getenv("VCINSTALLDIR"): if (env["debug_symbols"] == "full" or env["debug_symbols"] == "yes") and env["separate_debug_symbols"]: diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 4e1da22bb0..63f31307e7 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -65,7 +65,7 @@ def get_opts(): # Vista support dropped after EOL due to GH-10243 ("target_win_version", "Targeted Windows version, >= 0x0601 (Windows 7)", "0x0601"), EnumVariable("debug_symbols", "Add debugging symbols to release builds", "yes", ("yes", "no", "full")), - EnumVariable("windows_subsystem", "Windows subsystem", "gui", ("console", "gui")), + EnumVariable("windows_subsystem", "Windows subsystem", "default", ("default", "console", "gui")), BoolVariable("separate_debug_symbols", "Create a separate file containing debugging symbols", False), ("msvc_version", "MSVC version to use. Ignored if VCINSTALLDIR is set in shell env.", None), BoolVariable("use_mingw", "Use the Mingw compiler, even if MSVC is installed. Only used on Windows.", False), @@ -178,8 +178,15 @@ def configure_msvc(env, manual_msvc_config): """Configure env to work with MSVC""" # Build type + if env["tests"]: env["windows_subsystem"] = "console" + elif env["windows_subsystem"] == "default": + # Default means we use console for debug, gui for release. + if "debug" in env["target"]: + env["windows_subsystem"] = "console" + else: + env["windows_subsystem"] = "gui" if env["target"] == "release": if env["optimize"] == "speed": # optimize for speed (default) @@ -210,6 +217,7 @@ def configure_msvc(env, manual_msvc_config): env.Append(LINKFLAGS=["/SUBSYSTEM:WINDOWS"]) else: env.Append(LINKFLAGS=["/SUBSYSTEM:CONSOLE"]) + env.AppendUnique(CPPDEFINES=["WINDOWS_SUBSYSTEM_CONSOLE"]) ## Compile/link flags @@ -310,6 +318,12 @@ def configure_mingw(env): if env["tests"]: env["windows_subsystem"] = "console" + elif env["windows_subsystem"] == "default": + # Default means we use console for debug, gui for release. + if "debug" in env["target"]: + env["windows_subsystem"] = "console" + else: + env["windows_subsystem"] = "gui" if env["target"] == "release": env.Append(CCFLAGS=["-msse2"]) @@ -347,6 +361,7 @@ def configure_mingw(env): env.Append(LINKFLAGS=["-Wl,--subsystem,windows"]) else: env.Append(LINKFLAGS=["-Wl,--subsystem,console"]) + env.AppendUnique(CPPDEFINES=["WINDOWS_SUBSYSTEM_CONSOLE"]) ## Compiler configuration @@ -437,7 +452,7 @@ def configure_mingw(env): else: env.Append(LIBS=["cfgmgr32"]) - ## TODO !!! Reenable when OpenGLES Rendering Device is implemented !!! + ## TODO !!! Re-enable when OpenGLES Rendering Device is implemented !!! # env.Append(CPPDEFINES=['OPENGL_ENABLED']) env.Append(LIBS=["opengl32"]) diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 7f4669b3b2..dfbb734ee4 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -29,7 +29,9 @@ /*************************************************************************/ #include "display_server_windows.h" + #include "core/io/marshalls.h" +#include "core/math/geometry_2d.h" #include "main/main.h" #include "os_windows.h" #include "scene/resources/texture.h" @@ -597,6 +599,36 @@ void DisplayServerWindows::window_set_title(const String &p_title, WindowID p_wi SetWindowTextW(windows[p_window].hWnd, (LPCWSTR)(p_title.utf16().get_data())); } +void DisplayServerWindows::window_set_mouse_passthrough(const Vector<Vector2> &p_region, WindowID p_window) { + _THREAD_SAFE_METHOD_ + + ERR_FAIL_COND(!windows.has(p_window)); + windows[p_window].mpath = p_region; + _update_window_mouse_passthrough(p_window); +} + +void DisplayServerWindows::_update_window_mouse_passthrough(WindowID p_window) { + if (windows[p_window].mpath.size() == 0) { + SetWindowRgn(windows[p_window].hWnd, nullptr, TRUE); + } else { + POINT *points = (POINT *)memalloc(sizeof(POINT) * windows[p_window].mpath.size()); + for (int i = 0; i < windows[p_window].mpath.size(); i++) { + if (windows[p_window].borderless) { + points[i].x = windows[p_window].mpath[i].x; + points[i].y = windows[p_window].mpath[i].y; + } else { + points[i].x = windows[p_window].mpath[i].x + GetSystemMetrics(SM_CXSIZEFRAME); + points[i].y = windows[p_window].mpath[i].y + GetSystemMetrics(SM_CYSIZEFRAME) + GetSystemMetrics(SM_CYCAPTION); + } + } + + HRGN region = CreatePolygonRgn(points, windows[p_window].mpath.size(), ALTERNATE); + SetWindowRgn(windows[p_window].hWnd, region, TRUE); + DeleteObject(region); + memfree(points); + } +} + int DisplayServerWindows::window_get_current_screen(WindowID p_window) const { _THREAD_SAFE_METHOD_ @@ -1010,6 +1042,7 @@ void DisplayServerWindows::window_set_flag(WindowFlags p_flag, bool p_enabled, W case WINDOW_FLAG_BORDERLESS: { wd.borderless = p_enabled; _update_window_style(p_window); + _update_window_mouse_passthrough(p_window); } break; case WINDOW_FLAG_ALWAYS_ON_TOP: { ERR_FAIL_COND_MSG(wd.transient_parent != INVALID_WINDOW_ID && p_enabled, "Transient windows can't become on top"); diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h index 7bd93a7086..0fca2589ae 100644 --- a/platform/windows/display_server_windows.h +++ b/platform/windows/display_server_windows.h @@ -323,6 +323,8 @@ private: HWND hWnd; //layered window + Vector<Vector2> mpath; + bool preserve_window_size = false; bool pre_fs_valid = false; RECT pre_fs_rect; @@ -416,6 +418,7 @@ private: void _touch_event(WindowID p_window, bool p_pressed, float p_x, float p_y, int idx); void _update_window_style(WindowID p_window, bool p_repaint = true, bool p_maximized = false); + void _update_window_mouse_passthrough(WindowID p_window); void _update_real_mouse_position(WindowID p_window); @@ -477,6 +480,7 @@ public: virtual void window_set_drop_files_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID); virtual void window_set_title(const String &p_title, WindowID p_window = MAIN_WINDOW_ID); + virtual void window_set_mouse_passthrough(const Vector<Vector2> &p_region, WindowID p_window = MAIN_WINDOW_ID); virtual int window_get_current_screen(WindowID p_window = MAIN_WINDOW_ID) const; virtual void window_set_current_screen(int p_screen, WindowID p_window = MAIN_WINDOW_ID); diff --git a/scene/2d/animated_sprite_2d.cpp b/scene/2d/animated_sprite_2d.cpp index 3268544519..b3370863e1 100644 --- a/scene/2d/animated_sprite_2d.cpp +++ b/scene/2d/animated_sprite_2d.cpp @@ -660,11 +660,16 @@ StringName AnimatedSprite2D::get_animation() const { } String AnimatedSprite2D::get_configuration_warning() const { + String warning = Node2D::get_configuration_warning(); + if (frames.is_null()) { - return TTR("A SpriteFrames resource must be created or set in the \"Frames\" property in order for AnimatedSprite to display frames."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("A SpriteFrames resource must be created or set in the \"Frames\" property in order for AnimatedSprite to display frames."); } - return String(); + return warning; } void AnimatedSprite2D::set_specular_color(const Color &p_color) { diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp index ebfcb9cad6..d51ee3f9a8 100644 --- a/scene/2d/area_2d.cpp +++ b/scene/2d/area_2d.cpp @@ -180,26 +180,20 @@ void Area2D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i E->get().shapes.erase(ShapePair(p_body_shape, p_area_shape)); } - bool eraseit = false; - + bool in_tree = E->get().in_tree; if (E->get().rc == 0) { + body_map.erase(E); if (node) { node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_body_enter_tree)); node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_body_exit_tree)); - if (E->get().in_tree) { + if (in_tree) { emit_signal(SceneStringNames::get_singleton()->body_exited, obj); } } - - eraseit = true; } - if (!node || E->get().in_tree) { + if (!node || in_tree) { emit_signal(SceneStringNames::get_singleton()->body_shape_exited, objid, obj, p_body_shape, p_area_shape); } - - if (eraseit) { - body_map.erase(E); - } } locked = false; @@ -278,26 +272,20 @@ void Area2D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i E->get().shapes.erase(AreaShapePair(p_area_shape, p_self_shape)); } - bool eraseit = false; - + bool in_tree = E->get().in_tree; if (E->get().rc == 0) { + area_map.erase(E); if (node) { node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_area_enter_tree)); node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_area_exit_tree)); - if (E->get().in_tree) { + if (in_tree) { emit_signal(SceneStringNames::get_singleton()->area_exited, obj); } } - - eraseit = true; } - if (!node || E->get().in_tree) { + if (!node || in_tree) { emit_signal(SceneStringNames::get_singleton()->area_shape_exited, objid, obj, p_area_shape, p_self_shape); } - - if (eraseit) { - area_map.erase(E); - } } locked = false; diff --git a/scene/2d/canvas_modulate.cpp b/scene/2d/canvas_modulate.cpp index 56643542a8..8fb16534e8 100644 --- a/scene/2d/canvas_modulate.cpp +++ b/scene/2d/canvas_modulate.cpp @@ -78,14 +78,19 @@ String CanvasModulate::get_configuration_warning() const { return String(); } + String warning = Node2D::get_configuration_warning(); + List<Node *> nodes; get_tree()->get_nodes_in_group("_canvas_modulate_" + itos(get_canvas().get_id()), &nodes); if (nodes.size() > 1) { - return TTR("Only one visible CanvasModulate is allowed per scene (or set of instanced scenes). The first created one will work, while the rest will be ignored."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("Only one visible CanvasModulate is allowed per scene (or set of instanced scenes). The first created one will work, while the rest will be ignored."); } - return String(); + return warning; } CanvasModulate::CanvasModulate() { diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp index d23398713a..3cbb0f72f8 100644 --- a/scene/2d/collision_polygon_2d.cpp +++ b/scene/2d/collision_polygon_2d.cpp @@ -230,15 +230,23 @@ bool CollisionPolygon2D::_edit_is_selected_on_click(const Point2 &p_point, doubl #endif String CollisionPolygon2D::get_configuration_warning() const { + String warning = Node2D::get_configuration_warning(); + if (!Object::cast_to<CollisionObject2D>(get_parent())) { - return TTR("CollisionPolygon2D only serves to provide a collision shape to a CollisionObject2D derived node. Please only use it as a child of Area2D, StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("CollisionPolygon2D only serves to provide a collision shape to a CollisionObject2D derived node. Please only use it as a child of Area2D, StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."); } if (polygon.empty()) { - return TTR("An empty CollisionPolygon2D has no effect on collision."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("An empty CollisionPolygon2D has no effect on collision."); } - return String(); + return warning; } void CollisionPolygon2D::set_disabled(bool p_disabled) { diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index e3a632c98a..8d1162b7e3 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -254,7 +254,7 @@ bool CPUParticles2D::get_fractional_delta() const { } String CPUParticles2D::get_configuration_warning() const { - String warnings; + String warnings = Node2D::get_configuration_warning(); CanvasItemMaterial *mat = Object::cast_to<CanvasItemMaterial>(get_material().ptr()); @@ -1291,7 +1291,7 @@ void CPUParticles2D::_bind_methods() { ClassDB::bind_method(D_METHOD("convert_from_particles", "particles"), &CPUParticles2D::convert_from_particles); ADD_GROUP("Emission Shape", "emission_"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Box,Points,Directed Points"), "set_emission_shape", "get_emission_shape"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Box,Points,Directed Points", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_emission_shape", "get_emission_shape"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01"), "set_emission_sphere_radius", "get_emission_sphere_radius"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "emission_rect_extents"), "set_emission_rect_extents", "get_emission_rect_extents"); ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "emission_points"), "set_emission_points", "get_emission_points"); diff --git a/scene/2d/gpu_particles_2d.cpp b/scene/2d/gpu_particles_2d.cpp index 0814fbb549..01da36ec34 100644 --- a/scene/2d/gpu_particles_2d.cpp +++ b/scene/2d/gpu_particles_2d.cpp @@ -222,7 +222,7 @@ String GPUParticles2D::get_configuration_warning() const { return TTR("GPU-based particles are not supported by the GLES2 video driver.\nUse the CPUParticles2D node instead. You can use the \"Convert to CPUParticles2D\" option for this purpose."); } - String warnings; + String warnings = Node2D::get_configuration_warning(); if (process_material.is_null()) { if (warnings != String()) { diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp index 1e7e9f6b6a..217a210342 100644 --- a/scene/2d/light_2d.cpp +++ b/scene/2d/light_2d.cpp @@ -310,11 +310,16 @@ void Light2D::_notification(int p_what) { } String Light2D::get_configuration_warning() const { + String warning = Node2D::get_configuration_warning(); + if (!texture.is_valid()) { - return TTR("A texture with the shape of the light must be supplied to the \"Texture\" property."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("A texture with the shape of the light must be supplied to the \"Texture\" property."); } - return String(); + return warning; } void Light2D::set_shadow_smooth(float p_amount) { diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp index 023cfa6d03..b2ea60f895 100644 --- a/scene/2d/light_occluder_2d.cpp +++ b/scene/2d/light_occluder_2d.cpp @@ -246,15 +246,23 @@ int LightOccluder2D::get_occluder_light_mask() const { } String LightOccluder2D::get_configuration_warning() const { + String warning = Node2D::get_configuration_warning(); + if (!occluder_polygon.is_valid()) { - return TTR("An occluder polygon must be set (or drawn) for this occluder to take effect."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("An occluder polygon must be set (or drawn) for this occluder to take effect."); } if (occluder_polygon.is_valid() && occluder_polygon->get_polygon().size() == 0) { - return TTR("The occluder polygon for this occluder is empty. Please draw a polygon."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("The occluder polygon for this occluder is empty. Please draw a polygon."); } - return String(); + return warning; } void LightOccluder2D::_bind_methods() { diff --git a/scene/2d/navigation_agent_2d.cpp b/scene/2d/navigation_agent_2d.cpp index e5cdade4a4..9949ac6228 100644 --- a/scene/2d/navigation_agent_2d.cpp +++ b/scene/2d/navigation_agent_2d.cpp @@ -271,11 +271,16 @@ void NavigationAgent2D::_avoidance_done(Vector3 p_new_velocity) { } String NavigationAgent2D::get_configuration_warning() const { + String warning = Node::get_configuration_warning(); + if (!Object::cast_to<Node2D>(get_parent())) { - return TTR("The NavigationAgent2D can be used only under a Node2D node"); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("The NavigationAgent2D can be used only under a Node2D node"); } - return String(); + return warning; } void NavigationAgent2D::update_navigation() { diff --git a/scene/2d/navigation_obstacle_2d.cpp b/scene/2d/navigation_obstacle_2d.cpp index 568023bbe2..252d7cbb96 100644 --- a/scene/2d/navigation_obstacle_2d.cpp +++ b/scene/2d/navigation_obstacle_2d.cpp @@ -106,11 +106,16 @@ Node *NavigationObstacle2D::get_navigation_node() const { } String NavigationObstacle2D::get_configuration_warning() const { + String warning = Node::get_configuration_warning(); + if (!Object::cast_to<Node2D>(get_parent())) { - return TTR("The NavigationObstacle2D only serves to provide collision avoidance to a Node2D object."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("The NavigationObstacle2D only serves to provide collision avoidance to a Node2D object."); } - return String(); + return warning; } void NavigationObstacle2D::update_agent_shape() { diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp index 671bda558d..67e7176e6e 100644 --- a/scene/2d/navigation_region_2d.cpp +++ b/scene/2d/navigation_region_2d.cpp @@ -500,19 +500,26 @@ String NavigationRegion2D::get_configuration_warning() const { return String(); } + String warning = Node2D::get_configuration_warning(); + if (!navpoly.is_valid()) { - return TTR("A NavigationPolygon resource must be set or created for this node to work. Please set a property or draw a polygon."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("A NavigationPolygon resource must be set or created for this node to work. Please set a property or draw a polygon."); } const Node2D *c = this; while (c) { if (Object::cast_to<Navigation2D>(c)) { - return String(); + return warning; } c = Object::cast_to<Node2D>(c->get_parent()); } - - return TTR("NavigationRegion2D must be a child or grandchild to a Navigation2D node. It only provides navigation data."); + if (!warning.empty()) { + warning += "\n\n"; + } + return warning + TTR("NavigationRegion2D must be a child or grandchild to a Navigation2D node. It only provides navigation data."); } void NavigationRegion2D::_bind_methods() { diff --git a/scene/2d/parallax_background.cpp b/scene/2d/parallax_background.cpp index 416622e6d5..8c9432f2fa 100644 --- a/scene/2d/parallax_background.cpp +++ b/scene/2d/parallax_background.cpp @@ -101,7 +101,7 @@ void ParallaxBackground::_update_scroll() { } if (ignore_camera_zoom) { - l->set_base_offset_and_scale(ofs, 1.0, screen_offset); + l->set_base_offset_and_scale((ofs + screen_offset * (scale - 1)) / scale, 1.0, screen_offset); } else { l->set_base_offset_and_scale(ofs, scale, screen_offset); } diff --git a/scene/2d/parallax_layer.cpp b/scene/2d/parallax_layer.cpp index 4ed335dec8..ec1f1f40fa 100644 --- a/scene/2d/parallax_layer.cpp +++ b/scene/2d/parallax_layer.cpp @@ -136,11 +136,16 @@ void ParallaxLayer::set_base_offset_and_scale(const Point2 &p_offset, float p_sc } String ParallaxLayer::get_configuration_warning() const { + String warning = Node2D::get_configuration_warning(); + if (!Object::cast_to<ParallaxBackground>(get_parent())) { - return TTR("ParallaxLayer node only works when set as child of a ParallaxBackground node."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("ParallaxLayer node only works when set as child of a ParallaxBackground node."); } - return String(); + return warning; } void ParallaxLayer::_bind_methods() { diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index f2f549e851..d5994422e7 100644 --- a/scene/2d/path_2d.cpp +++ b/scene/2d/path_2d.cpp @@ -254,11 +254,16 @@ String PathFollow2D::get_configuration_warning() const { return String(); } + String warning = Node2D::get_configuration_warning(); + if (!Object::cast_to<Path2D>(get_parent())) { - return TTR("PathFollow2D only works when set as a child of a Path2D node."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("PathFollow2D only works when set as a child of a Path2D node."); } - return String(); + return warning; } void PathFollow2D::_bind_methods() { diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 0a9de20664..22d426bdb4 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -748,7 +748,7 @@ String RigidBody2D::get_configuration_warning() const { String warning = CollisionObject2D::get_configuration_warning(); if ((get_mode() == MODE_RIGID || get_mode() == MODE_CHARACTER) && (ABS(t.elements[0].length() - 1.0) > 0.05 || ABS(t.elements[1].length() - 1.0) > 0.05)) { - if (warning != String()) { + if (!warning.empty()) { warning += "\n\n"; } warning += TTR("Size changes to RigidBody2D (in character or rigid modes) will be overridden by the physics engine when running.\nChange the size in children collision shapes instead."); diff --git a/scene/2d/remote_transform_2d.cpp b/scene/2d/remote_transform_2d.cpp index 3104436dbe..7655416ce2 100644 --- a/scene/2d/remote_transform_2d.cpp +++ b/scene/2d/remote_transform_2d.cpp @@ -186,11 +186,16 @@ void RemoteTransform2D::force_update_cache() { } String RemoteTransform2D::get_configuration_warning() const { + String warning = Node2D::get_configuration_warning(); + if (!has_node(remote_node) || !Object::cast_to<Node2D>(get_node(remote_node))) { - return TTR("Path property must point to a valid Node2D node to work."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("Path property must point to a valid Node2D node to work."); } - return String(); + return warning; } void RemoteTransform2D::_bind_methods() { diff --git a/scene/2d/skeleton_2d.cpp b/scene/2d/skeleton_2d.cpp index ea37c8dfe7..ea1d9f5930 100644 --- a/scene/2d/skeleton_2d.cpp +++ b/scene/2d/skeleton_2d.cpp @@ -136,7 +136,7 @@ int Bone2D::get_index_in_skeleton() const { String Bone2D::get_configuration_warning() const { String warning = Node2D::get_configuration_warning(); if (!skeleton) { - if (warning != String()) { + if (!warning.empty()) { warning += "\n\n"; } if (parent_bone) { @@ -147,7 +147,7 @@ String Bone2D::get_configuration_warning() const { } if (rest == Transform2D(0, 0, 0, 0, 0, 0)) { - if (warning != String()) { + if (!warning.empty()) { warning += "\n\n"; } warning += TTR("This bone lacks a proper REST pose. Go to the Skeleton2D node and set one."); diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index c7a809f6d8..c2951559a4 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -412,6 +412,9 @@ void TileMap::update_dirty_quadrants() { vs->canvas_item_set_light_mask(canvas_item, get_light_mask()); vs->canvas_item_set_z_index(canvas_item, z_index); + vs->canvas_item_set_default_texture_filter(canvas_item, RS::CanvasItemTextureFilter(CanvasItem::get_texture_filter())); + vs->canvas_item_set_default_texture_repeat(canvas_item, RS::CanvasItemTextureRepeat(CanvasItem::get_texture_repeat())); + q.canvas_items.push_back(canvas_item); if (debug_shapes) { @@ -1687,6 +1690,28 @@ bool TileMap::get_clip_uv() const { return clip_uv; } +void TileMap::set_texture_filter(TextureFilter p_texture_filter) { + CanvasItem::set_texture_filter(p_texture_filter); + for (Map<PosKey, Quadrant>::Element *F = quadrant_map.front(); F; F = F->next()) { + Quadrant &q = F->get(); + for (List<RID>::Element *E = q.canvas_items.front(); E; E = E->next()) { + RenderingServer::get_singleton()->canvas_item_set_default_texture_filter(E->get(), RS::CanvasItemTextureFilter(p_texture_filter)); + _make_quadrant_dirty(F); + } + } +} + +void TileMap::set_texture_repeat(CanvasItem::TextureRepeat p_texture_repeat) { + CanvasItem::set_texture_repeat(p_texture_repeat); + for (Map<PosKey, Quadrant>::Element *F = quadrant_map.front(); F; F = F->next()) { + Quadrant &q = F->get(); + for (List<RID>::Element *E = q.canvas_items.front(); E; E = E->next()) { + RenderingServer::get_singleton()->canvas_item_set_default_texture_repeat(E->get(), RS::CanvasItemTextureRepeat(p_texture_repeat)); + _make_quadrant_dirty(F); + } + } +} + String TileMap::get_configuration_warning() const { String warning = Node2D::get_configuration_warning(); diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h index 7a2a3e412c..b9dd8f5405 100644 --- a/scene/2d/tile_map.h +++ b/scene/2d/tile_map.h @@ -342,6 +342,10 @@ public: String get_configuration_warning() const override; + virtual void set_texture_filter(CanvasItem::TextureFilter p_texture_filter) override; + + virtual void set_texture_repeat(CanvasItem::TextureRepeat p_texture_repeat) override; + void fix_invalid_tiles(); void clear(); diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp index 75154c7acb..9cec589cfb 100644 --- a/scene/2d/visibility_notifier_2d.cpp +++ b/scene/2d/visibility_notifier_2d.cpp @@ -313,12 +313,17 @@ void VisibilityEnabler2D::_node_removed(Node *p_node) { } String VisibilityEnabler2D::get_configuration_warning() const { + String warning = VisibilityNotifier2D::get_configuration_warning(); + #ifdef TOOLS_ENABLED if (is_inside_tree() && get_parent() && (get_parent()->get_filename() == String() && get_parent() != get_tree()->get_edited_scene_root())) { - return TTR("VisibilityEnabler2D works best when used with the edited scene root directly as parent."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("VisibilityEnabler2D works best when used with the edited scene root directly as parent."); } #endif - return String(); + return warning; } void VisibilityEnabler2D::_bind_methods() { diff --git a/scene/3d/area_3d.cpp b/scene/3d/area_3d.cpp index dc35f069c0..b1ffe76662 100644 --- a/scene/3d/area_3d.cpp +++ b/scene/3d/area_3d.cpp @@ -180,26 +180,20 @@ void Area3D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i E->get().shapes.erase(ShapePair(p_body_shape, p_area_shape)); } - bool eraseit = false; - + bool in_tree = E->get().in_tree; if (E->get().rc == 0) { + body_map.erase(E); if (node) { node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area3D::_body_enter_tree)); node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area3D::_body_exit_tree)); - if (E->get().in_tree) { + if (in_tree) { emit_signal(SceneStringNames::get_singleton()->body_exited, obj); } } - - eraseit = true; } - if (node && E->get().in_tree) { + if (node && in_tree) { emit_signal(SceneStringNames::get_singleton()->body_shape_exited, objid, obj, p_body_shape, p_area_shape); } - - if (eraseit) { - body_map.erase(E); - } } locked = false; @@ -366,26 +360,20 @@ void Area3D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i E->get().shapes.erase(AreaShapePair(p_area_shape, p_self_shape)); } - bool eraseit = false; - + bool in_tree = E->get().in_tree; if (E->get().rc == 0) { + area_map.erase(E); if (node) { node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area3D::_area_enter_tree)); node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area3D::_area_exit_tree)); - if (E->get().in_tree) { + if (in_tree) { emit_signal(SceneStringNames::get_singleton()->area_exited, obj); } } - - eraseit = true; } - if (!node || E->get().in_tree) { + if (!node || in_tree) { emit_signal(SceneStringNames::get_singleton()->area_shape_exited, objid, obj, p_area_shape, p_self_shape); } - - if (eraseit) { - area_map.erase(E); - } } locked = false; diff --git a/scene/3d/collision_polygon_3d.cpp b/scene/3d/collision_polygon_3d.cpp index e2d11c740a..b8a4ab74ee 100644 --- a/scene/3d/collision_polygon_3d.cpp +++ b/scene/3d/collision_polygon_3d.cpp @@ -156,15 +156,23 @@ bool CollisionPolygon3D::is_disabled() const { } String CollisionPolygon3D::get_configuration_warning() const { + String warning = Node3D::get_configuration_warning(); + if (!Object::cast_to<CollisionObject3D>(get_parent())) { - return TTR("CollisionPolygon3D only serves to provide a collision shape to a CollisionObject3D derived node. Please only use it as a child of Area3D, StaticBody3D, RigidBody3D, KinematicBody3D, etc. to give them a shape."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("CollisionPolygon3D only serves to provide a collision shape to a CollisionObject3D derived node. Please only use it as a child of Area3D, StaticBody3D, RigidBody3D, KinematicBody3D, etc. to give them a shape."); } if (polygon.empty()) { - return TTR("An empty CollisionPolygon3D has no effect on collision."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("An empty CollisionPolygon3D has no effect on collision."); } - return String(); + return warning; } bool CollisionPolygon3D::_is_editable_3d_polygon() const { diff --git a/scene/3d/collision_shape_3d.cpp b/scene/3d/collision_shape_3d.cpp index e7f3f53ca9..e1c691b89a 100644 --- a/scene/3d/collision_shape_3d.cpp +++ b/scene/3d/collision_shape_3d.cpp @@ -124,23 +124,33 @@ void CollisionShape3D::resource_changed(RES res) { } String CollisionShape3D::get_configuration_warning() const { + String warning = Node3D::get_configuration_warning(); + if (!Object::cast_to<CollisionObject3D>(get_parent())) { - return TTR("CollisionShape3D only serves to provide a collision shape to a CollisionObject3D derived node. Please only use it as a child of Area3D, StaticBody3D, RigidBody3D, KinematicBody3D, etc. to give them a shape."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("CollisionShape3D only serves to provide a collision shape to a CollisionObject3D derived node. Please only use it as a child of Area3D, StaticBody3D, RigidBody3D, KinematicBody3D, etc. to give them a shape."); } if (!shape.is_valid()) { - return TTR("A shape must be provided for CollisionShape3D to function. Please create a shape resource for it."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("A shape must be provided for CollisionShape3D to function. Please create a shape resource for it."); } - if (Object::cast_to<RigidBody3D>(get_parent())) { - if (Object::cast_to<ConcavePolygonShape3D>(*shape)) { - if (Object::cast_to<RigidBody3D>(get_parent())->get_mode() != RigidBody3D::MODE_STATIC) { - return TTR("ConcavePolygonShape3D doesn't support RigidBody3D in another mode than static."); - } + if (shape.is_valid() && + Object::cast_to<RigidBody3D>(get_parent()) && + Object::cast_to<ConcavePolygonShape3D>(*shape) && + Object::cast_to<RigidBody3D>(get_parent())->get_mode() != RigidBody3D::MODE_STATIC) { + if (!warning.empty()) { + warning += "\n\n"; } + warning += TTR("ConcavePolygonShape3D doesn't support RigidBody3D in another mode than static."); } - return String(); + return warning; } void CollisionShape3D::_bind_methods() { diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp index ad8760251f..c977e0d4aa 100644 --- a/scene/3d/cpu_particles_3d.cpp +++ b/scene/3d/cpu_particles_3d.cpp @@ -189,7 +189,7 @@ bool CPUParticles3D::get_fractional_delta() const { } String CPUParticles3D::get_configuration_warning() const { - String warnings; + String warnings = GeometryInstance3D::get_configuration_warning(); bool mesh_found = false; bool anim_material_found = false; @@ -1345,7 +1345,7 @@ void CPUParticles3D::_bind_methods() { ClassDB::bind_method(D_METHOD("convert_from_particles", "particles"), &CPUParticles3D::convert_from_particles); ADD_GROUP("Emission Shape", "emission_"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Box,Points,Directed Points"), "set_emission_shape", "get_emission_shape"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Box,Points,Directed Points", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_emission_shape", "get_emission_shape"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01"), "set_emission_sphere_radius", "get_emission_sphere_radius"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "emission_box_extents"), "set_emission_box_extents", "get_emission_box_extents"); ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "emission_points"), "set_emission_points", "get_emission_points"); diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 1b6f9b45b9..ab30d2fec5 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -514,10 +514,15 @@ Vector<Face3> GIProbe::get_faces(uint32_t p_usage_flags) const { } String GIProbe::get_configuration_warning() const { + String warning = VisualInstance3D::get_configuration_warning(); + if (RenderingServer::get_singleton()->is_low_end()) { - return TTR("GIProbes are not supported by the GLES2 video driver.\nUse a BakedLightmap instead."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("GIProbes are not supported by the GLES2 video driver.\nUse a BakedLightmap instead."); } - return String(); + return warning; } void GIProbe::_bind_methods() { diff --git a/scene/3d/gpu_particles_3d.cpp b/scene/3d/gpu_particles_3d.cpp index 6fa0fc6ecb..da5c99a873 100644 --- a/scene/3d/gpu_particles_3d.cpp +++ b/scene/3d/gpu_particles_3d.cpp @@ -232,7 +232,7 @@ String GPUParticles3D::get_configuration_warning() const { return TTR("GPU-based particles are not supported by the GLES2 video driver.\nUse the CPUParticles3D node instead. You can use the \"Convert to CPUParticles3D\" option for this purpose."); } - String warnings; + String warnings = GeometryInstance3D::get_configuration_warning(); bool meshes_found = false; bool anim_material_found = false; diff --git a/scene/3d/light_3d.cpp b/scene/3d/light_3d.cpp index 2eb12d10fa..46c3f18c38 100644 --- a/scene/3d/light_3d.cpp +++ b/scene/3d/light_3d.cpp @@ -448,7 +448,7 @@ String OmniLight3D::get_configuration_warning() const { String warning = Light3D::get_configuration_warning(); if (!has_shadow() && get_projector().is_valid()) { - if (warning != String()) { + if (!warning.empty()) { warning += "\n\n"; } warning += TTR("Projector texture only works with shadows active."); @@ -482,15 +482,14 @@ String SpotLight3D::get_configuration_warning() const { String warning = Light3D::get_configuration_warning(); if (has_shadow() && get_param(PARAM_SPOT_ANGLE) >= 90.0) { - if (warning != String()) { + if (!warning.empty()) { warning += "\n\n"; } - warning += TTR("A SpotLight3D with an angle wider than 90 degrees cannot cast shadows."); } if (!has_shadow() && get_projector().is_valid()) { - if (warning != String()) { + if (!warning.empty()) { warning += "\n\n"; } warning += TTR("Projector texture only works with shadows active."); diff --git a/scene/3d/navigation_agent_3d.cpp b/scene/3d/navigation_agent_3d.cpp index e179261002..422b566867 100644 --- a/scene/3d/navigation_agent_3d.cpp +++ b/scene/3d/navigation_agent_3d.cpp @@ -287,11 +287,16 @@ void NavigationAgent3D::_avoidance_done(Vector3 p_new_velocity) { } String NavigationAgent3D::get_configuration_warning() const { + String warning = Node::get_configuration_warning(); + if (!Object::cast_to<Node3D>(get_parent())) { - return TTR("The NavigationAgent3D can be used only under a spatial node."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("The NavigationAgent3D can be used only under a spatial node."); } - return String(); + return warning; } void NavigationAgent3D::update_navigation() { diff --git a/scene/3d/navigation_obstacle_3d.cpp b/scene/3d/navigation_obstacle_3d.cpp index 69fd5b02fc..adbff06ed6 100644 --- a/scene/3d/navigation_obstacle_3d.cpp +++ b/scene/3d/navigation_obstacle_3d.cpp @@ -113,11 +113,16 @@ Node *NavigationObstacle3D::get_navigation_node() const { } String NavigationObstacle3D::get_configuration_warning() const { + String warning = Node::get_configuration_warning(); + if (!Object::cast_to<Node3D>(get_parent())) { - return TTR("The NavigationObstacle3D only serves to provide collision avoidance to a spatial object."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("The NavigationObstacle3D only serves to provide collision avoidance to a spatial object."); } - return String(); + return warning; } void NavigationObstacle3D::update_agent_shape() { diff --git a/scene/3d/navigation_region_3d.cpp b/scene/3d/navigation_region_3d.cpp index 15ed448a65..3d3467583d 100644 --- a/scene/3d/navigation_region_3d.cpp +++ b/scene/3d/navigation_region_3d.cpp @@ -189,19 +189,28 @@ String NavigationRegion3D::get_configuration_warning() const { return String(); } + String warning = Node3D::get_configuration_warning(); + if (!navmesh.is_valid()) { - return TTR("A NavigationMesh resource must be set or created for this node to work."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("A NavigationMesh resource must be set or created for this node to work."); } + const Node3D *c = this; while (c) { if (Object::cast_to<Navigation3D>(c)) { - return String(); + return warning; } c = Object::cast_to<Node3D>(c->get_parent()); } - return TTR("NavigationRegion3D must be a child or grandchild to a Navigation3D node. It only provides navigation data."); + if (!warning.empty()) { + warning += "\n\n"; + } + return warning + TTR("NavigationRegion3D must be a child or grandchild to a Navigation3D node. It only provides navigation data."); } void NavigationRegion3D::_bind_methods() { diff --git a/scene/3d/node_3d.cpp b/scene/3d/node_3d.cpp index bd9e4f5bde..138788cf2d 100644 --- a/scene/3d/node_3d.cpp +++ b/scene/3d/node_3d.cpp @@ -103,8 +103,8 @@ void Node3D::_propagate_transform_changed(Node3D *p_origin) { data.children_lock++; for (List<Node3D *>::Element *E = data.children.front(); E; E = E->next()) { - if (E->get()->data.toplevel_active) { - continue; //don't propagate to a toplevel + if (E->get()->data.top_level_active) { + continue; //don't propagate to a top_level } E->get()->_propagate_transform_changed(p_origin); } @@ -136,12 +136,12 @@ void Node3D::_notification(int p_what) { data.C = nullptr; } - if (data.toplevel && !Engine::get_singleton()->is_editor_hint()) { + if (data.top_level && !Engine::get_singleton()->is_editor_hint()) { if (data.parent) { data.local_transform = data.parent->get_global_transform() * get_transform(); data.dirty = DIRTY_VECTORS; //global is always dirty upon entering a scene } - data.toplevel_active = true; + data.top_level_active = true; } data.dirty |= DIRTY_GLOBAL; //global is always dirty upon entering a scene @@ -160,7 +160,7 @@ void Node3D::_notification(int p_what) { } data.parent = nullptr; data.C = nullptr; - data.toplevel_active = false; + data.top_level_active = false; } break; case NOTIFICATION_ENTER_WORLD: { data.inside_world = true; @@ -238,7 +238,7 @@ void Node3D::set_transform(const Transform &p_transform) { void Node3D::set_global_transform(const Transform &p_transform) { Transform xform = - (data.parent && !data.toplevel_active) ? + (data.parent && !data.top_level_active) ? data.parent->get_global_transform().affine_inverse() * p_transform : p_transform; @@ -261,7 +261,7 @@ Transform Node3D::get_global_transform() const { _update_local_transform(); } - if (data.parent && !data.toplevel_active) { + if (data.parent && !data.top_level_active) { data.global_transform = data.parent->get_global_transform() * data.local_transform; } else { data.global_transform = data.local_transform; @@ -462,8 +462,8 @@ bool Node3D::is_scale_disabled() const { return data.disable_scale; } -void Node3D::set_as_toplevel(bool p_enabled) { - if (data.toplevel == p_enabled) { +void Node3D::set_as_top_level(bool p_enabled) { + if (data.top_level == p_enabled) { return; } if (is_inside_tree() && !Engine::get_singleton()->is_editor_hint()) { @@ -473,16 +473,16 @@ void Node3D::set_as_toplevel(bool p_enabled) { set_transform(data.parent->get_global_transform().affine_inverse() * get_global_transform()); } - data.toplevel = p_enabled; - data.toplevel_active = p_enabled; + data.top_level = p_enabled; + data.top_level_active = p_enabled; } else { - data.toplevel = p_enabled; + data.top_level = p_enabled; } } -bool Node3D::is_set_as_toplevel() const { - return data.toplevel; +bool Node3D::is_set_as_top_level() const { + return data.top_level; } Ref<World3D> Node3D::get_world_3d() const { @@ -715,8 +715,8 @@ void Node3D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_global_transform"), &Node3D::get_global_transform); ClassDB::bind_method(D_METHOD("get_parent_spatial"), &Node3D::get_parent_spatial); ClassDB::bind_method(D_METHOD("set_ignore_transform_notification", "enabled"), &Node3D::set_ignore_transform_notification); - ClassDB::bind_method(D_METHOD("set_as_toplevel", "enable"), &Node3D::set_as_toplevel); - ClassDB::bind_method(D_METHOD("is_set_as_toplevel"), &Node3D::is_set_as_toplevel); + ClassDB::bind_method(D_METHOD("set_as_top_level", "enable"), &Node3D::set_as_top_level); + ClassDB::bind_method(D_METHOD("is_set_as_top_level"), &Node3D::is_set_as_top_level); ClassDB::bind_method(D_METHOD("set_disable_scale", "disable"), &Node3D::set_disable_scale); ClassDB::bind_method(D_METHOD("is_scale_disabled"), &Node3D::is_scale_disabled); ClassDB::bind_method(D_METHOD("get_world_3d"), &Node3D::get_world_3d); @@ -773,6 +773,7 @@ void Node3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "rotation_degrees", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_rotation_degrees", "get_rotation_degrees"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "rotation", PROPERTY_HINT_NONE, "", 0), "set_rotation", "get_rotation"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "scale", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_scale", "get_scale"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "top_level"), "set_as_top_level", "is_set_as_top_level"); ADD_GROUP("Matrix", ""); ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "transform", PROPERTY_HINT_NONE, ""), "set_transform", "get_transform"); ADD_GROUP("Visibility", ""); @@ -788,8 +789,8 @@ Node3D::Node3D() : data.children_lock = 0; data.ignore_notification = false; - data.toplevel = false; - data.toplevel_active = false; + data.top_level = false; + data.top_level_active = false; data.scale = Vector3(1, 1, 1); data.viewport = nullptr; data.inside_world = false; diff --git a/scene/3d/node_3d.h b/scene/3d/node_3d.h index 327d4671e9..229e0f2c8c 100644 --- a/scene/3d/node_3d.h +++ b/scene/3d/node_3d.h @@ -71,8 +71,8 @@ class Node3D : public Node { Viewport *viewport; - bool toplevel_active; - bool toplevel; + bool top_level_active; + bool top_level; bool inside_world; int children_lock; @@ -144,8 +144,8 @@ public: virtual Transform get_local_gizmo_transform() const; #endif - void set_as_toplevel(bool p_enabled); - bool is_set_as_toplevel() const; + void set_as_top_level(bool p_enabled); + bool is_set_as_top_level() const; void set_disable_scale(bool p_enabled); bool is_scale_disabled() const; diff --git a/scene/3d/path_3d.cpp b/scene/3d/path_3d.cpp index bf69a8598d..d0d2d6f9f4 100644 --- a/scene/3d/path_3d.cpp +++ b/scene/3d/path_3d.cpp @@ -250,16 +250,24 @@ String PathFollow3D::get_configuration_warning() const { return String(); } + String warning = Node3D::get_configuration_warning(); + if (!Object::cast_to<Path3D>(get_parent())) { - return TTR("PathFollow3D only works when set as a child of a Path3D node."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("PathFollow3D only works when set as a child of a Path3D node."); } else { Path3D *path = Object::cast_to<Path3D>(get_parent()); if (path->get_curve().is_valid() && !path->get_curve()->is_up_vector_enabled() && rotation_mode == ROTATION_ORIENTED) { - return TTR("PathFollow3D's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its parent Path3D's Curve resource."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("PathFollow3D's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its parent Path3D's Curve resource."); } } - return String(); + return warning; } void PathFollow3D::_bind_methods() { diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp index fc021e5532..193d016010 100644 --- a/scene/3d/physics_body_3d.cpp +++ b/scene/3d/physics_body_3d.cpp @@ -737,7 +737,7 @@ String RigidBody3D::get_configuration_warning() const { String warning = CollisionObject3D::get_configuration_warning(); if ((get_mode() == MODE_RIGID || get_mode() == MODE_CHARACTER) && (ABS(t.basis.get_axis(0).length() - 1.0) > 0.05 || ABS(t.basis.get_axis(1).length() - 1.0) > 0.05 || ABS(t.basis.get_axis(2).length() - 1.0) > 0.05)) { - if (warning != String()) { + if (!warning.empty()) { warning += "\n\n"; } warning += TTR("Size changes to RigidBody3D (in character or rigid modes) will be overridden by the physics engine when running.\nChange the size in children collision shapes instead."); @@ -2606,7 +2606,7 @@ void PhysicalBone3D::_start_physics_simulation() { PhysicsServer3D::get_singleton()->body_set_collision_layer(get_rid(), get_collision_layer()); PhysicsServer3D::get_singleton()->body_set_collision_mask(get_rid(), get_collision_mask()); PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), this, "_direct_state_changed"); - set_as_toplevel(true); + set_as_top_level(true); _internal_simulate_physics = true; } @@ -2626,7 +2626,7 @@ void PhysicalBone3D::_stop_physics_simulation() { if (_internal_simulate_physics) { PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), nullptr, ""); parent_skeleton->set_bone_global_pose_override(bone_id, Transform(), 0.0, false); - set_as_toplevel(false); + set_as_top_level(false); _internal_simulate_physics = false; } } diff --git a/scene/3d/remote_transform_3d.cpp b/scene/3d/remote_transform_3d.cpp index 95fce6b802..358f9346f8 100644 --- a/scene/3d/remote_transform_3d.cpp +++ b/scene/3d/remote_transform_3d.cpp @@ -180,11 +180,16 @@ void RemoteTransform3D::force_update_cache() { } String RemoteTransform3D::get_configuration_warning() const { + String warning = Node3D::get_configuration_warning(); + if (!has_node(remote_node) || !Object::cast_to<Node3D>(get_node(remote_node))) { - return TTR("The \"Remote Path\" property must point to a valid Node3D or Node3D-derived node to work."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("The \"Remote Path\" property must point to a valid Node3D or Node3D-derived node to work."); } - return String(); + return warning; } void RemoteTransform3D::_bind_methods() { diff --git a/scene/3d/soft_body_3d.cpp b/scene/3d/soft_body_3d.cpp index d3d7cdc1ce..018a2a7a39 100644 --- a/scene/3d/soft_body_3d.cpp +++ b/scene/3d/soft_body_3d.cpp @@ -282,7 +282,7 @@ void SoftBody3D::_notification(int p_what) { set_notify_transform(false); // Required to be top level with Transform at center of world in order to modify RenderingServer only to support custom Transform - set_as_toplevel(true); + set_as_top_level(true); set_transform(Transform()); set_notify_transform(true); @@ -425,7 +425,7 @@ void SoftBody3D::_draw_soft_mesh() { /// Necessary in order to render the mesh correctly (Soft body nodes are in global space) simulation_started = true; - call_deferred("set_as_toplevel", true); + call_deferred("set_as_top_level", true); call_deferred("set_transform", Transform()); } diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index 6e38196ba6..9f4d64cb32 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -1074,11 +1074,16 @@ StringName AnimatedSprite3D::get_animation() const { } String AnimatedSprite3D::get_configuration_warning() const { + String warning = SpriteBase3D::get_configuration_warning(); + if (frames.is_null()) { - return TTR("A SpriteFrames resource must be created or set in the \"Frames\" property in order for AnimatedSprite3D to display frames."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("A SpriteFrames resource must be created or set in the \"Frames\" property in order for AnimatedSprite3D to display frames."); } - return String(); + return warning; } void AnimatedSprite3D::_bind_methods() { diff --git a/scene/3d/vehicle_body_3d.cpp b/scene/3d/vehicle_body_3d.cpp index 4c71ab470b..b58f313c16 100644 --- a/scene/3d/vehicle_body_3d.cpp +++ b/scene/3d/vehicle_body_3d.cpp @@ -103,11 +103,16 @@ void VehicleWheel3D::_notification(int p_what) { } String VehicleWheel3D::get_configuration_warning() const { + String warning = Node3D::get_configuration_warning(); + if (!Object::cast_to<VehicleBody3D>(get_parent())) { - return TTR("VehicleWheel3D serves to provide a wheel system to a VehicleBody3D. Please use it as a child of a VehicleBody3D."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("VehicleWheel3D serves to provide a wheel system to a VehicleBody3D. Please use it as a child of a VehicleBody3D."); } - return String(); + return warning; } void VehicleWheel3D::_update(PhysicsDirectBodyState3D *s) { diff --git a/scene/3d/world_environment.cpp b/scene/3d/world_environment.cpp index 5e73e460ed..3c12d4991e 100644 --- a/scene/3d/world_environment.cpp +++ b/scene/3d/world_environment.cpp @@ -110,22 +110,30 @@ Ref<CameraEffects> WorldEnvironment::get_camera_effects() const { } String WorldEnvironment::get_configuration_warning() const { + String warning = Node::get_configuration_warning(); + if (!environment.is_valid()) { - return TTR("WorldEnvironment requires its \"Environment\" property to contain an Environment to have a visible effect."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("WorldEnvironment requires its \"Environment\" property to contain an Environment to have a visible effect."); } if (!is_inside_tree()) { - return String(); + return warning; } List<Node *> nodes; get_tree()->get_nodes_in_group("_world_environment_" + itos(get_viewport()->find_world_3d()->get_scenario().get_id()), &nodes); if (nodes.size() > 1) { - return TTR("Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."); } - return String(); + return warning; } void WorldEnvironment::_bind_methods() { diff --git a/scene/3d/xr_nodes.cpp b/scene/3d/xr_nodes.cpp index f4a514cdd6..c0015aa338 100644 --- a/scene/3d/xr_nodes.cpp +++ b/scene/3d/xr_nodes.cpp @@ -60,13 +60,18 @@ String XRCamera3D::get_configuration_warning() const { return String(); } + String warning = Camera3D::get_configuration_warning(); + // must be child node of XROrigin3D! XROrigin3D *origin = Object::cast_to<XROrigin3D>(get_parent()); if (origin == nullptr) { - return TTR("XRCamera3D must have an XROrigin3D node as its parent."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("XRCamera3D must have an XROrigin3D node as its parent."); }; - return String(); + return warning; }; Vector3 XRCamera3D::project_local_ray_normal(const Point2 &p_pos) const { @@ -362,17 +367,25 @@ String XRController3D::get_configuration_warning() const { return String(); } + String warning = Node3D::get_configuration_warning(); + // must be child node of XROrigin! XROrigin3D *origin = Object::cast_to<XROrigin3D>(get_parent()); if (origin == nullptr) { - return TTR("XRController3D must have an XROrigin3D node as its parent."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("XRController3D must have an XROrigin3D node as its parent."); }; if (controller_id == 0) { - return TTR("The controller ID must not be 0 or this controller won't be bound to an actual controller."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("The controller ID must not be 0 or this controller won't be bound to an actual controller."); }; - return String(); + return warning; }; //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -479,17 +492,25 @@ String XRAnchor3D::get_configuration_warning() const { return String(); } + String warning = Node3D::get_configuration_warning(); + // must be child node of XROrigin3D! XROrigin3D *origin = Object::cast_to<XROrigin3D>(get_parent()); if (origin == nullptr) { - return TTR("XRAnchor3D must have an XROrigin3D node as its parent."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("XRAnchor3D must have an XROrigin3D node as its parent."); }; if (anchor_id == 0) { - return TTR("The anchor ID must not be 0 or this anchor won't be bound to an actual anchor."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("The anchor ID must not be 0 or this anchor won't be bound to an actual anchor."); }; - return String(); + return warning; }; Plane XRAnchor3D::get_plane() const { @@ -512,11 +533,16 @@ String XROrigin3D::get_configuration_warning() const { return String(); } + String warning = Node3D::get_configuration_warning(); + if (tracked_camera == nullptr) { - return TTR("XROrigin3D requires an XRCamera3D child node."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("XROrigin3D requires an XRCamera3D child node."); } - return String(); + return warning; }; void XROrigin3D::_bind_methods() { diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 66c587e2d4..30757d2d80 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -1294,12 +1294,12 @@ bool AnimationPlayer::is_valid() const { } float AnimationPlayer::get_current_animation_position() const { - ERR_FAIL_COND_V(!playback.current.from, 0); + ERR_FAIL_COND_V_MSG(!playback.current.from, 0, "AnimationPlayer has no current animation"); return playback.current.pos; } float AnimationPlayer::get_current_animation_length() const { - ERR_FAIL_COND_V(!playback.current.from, 0); + ERR_FAIL_COND_V_MSG(!playback.current.from, 0, "AnimationPlayer has no current animation"); return playback.current.from->animation->get_length(); } diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp index 466536db10..d7d55b468e 100644 --- a/scene/animation/animation_tree.cpp +++ b/scene/animation/animation_tree.cpp @@ -1288,39 +1288,31 @@ String AnimationTree::get_configuration_warning() const { String warning = Node::get_configuration_warning(); if (!root.is_valid()) { - if (warning != String()) { + if (!warning.empty()) { warning += "\n\n"; } warning += TTR("No root AnimationNode for the graph is set."); } if (!has_node(animation_player)) { - if (warning != String()) { + if (!warning.empty()) { warning += "\n\n"; } - warning += TTR("Path to an AnimationPlayer node containing animations is not set."); - return warning; - } - - AnimationPlayer *player = Object::cast_to<AnimationPlayer>(get_node(animation_player)); - - if (!player) { - if (warning != String()) { - warning += "\n\n"; - } - - warning += TTR("Path set for AnimationPlayer does not lead to an AnimationPlayer node."); - return warning; - } + } else { + AnimationPlayer *player = Object::cast_to<AnimationPlayer>(get_node(animation_player)); - if (!player->has_node(player->get_root())) { - if (warning != String()) { - warning += "\n\n"; + if (!player) { + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("Path set for AnimationPlayer does not lead to an AnimationPlayer node."); + } else if (!player->has_node(player->get_root())) { + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("The AnimationPlayer root node is not a valid node."); } - - warning += TTR("The AnimationPlayer root node is not a valid node."); - return warning; } return warning; diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 211082d610..2e77d20d4e 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -345,7 +345,7 @@ String BaseButton::get_tooltip(const Point2 &p_pos) const { String tooltip = Control::get_tooltip(p_pos); if (shortcut_in_tooltip && shortcut.is_valid() && shortcut->is_valid()) { String text = shortcut->get_name() + " (" + shortcut->get_as_text() + ")"; - if (shortcut->get_name().nocasecmp_to(tooltip) != 0) { + if (tooltip != String() && shortcut->get_name().nocasecmp_to(tooltip) != 0) { text += "\n" + tooltip; } tooltip = text; diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp index f130726837..33e030a573 100644 --- a/scene/gui/box_container.cpp +++ b/scene/gui/box_container.cpp @@ -57,7 +57,7 @@ void BoxContainer::_resort() { if (!c || !c->is_visible_in_tree()) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } @@ -111,7 +111,7 @@ void BoxContainer::_resort() { if (!c || !c->is_visible_in_tree()) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } @@ -172,7 +172,7 @@ void BoxContainer::_resort() { if (!c || !c->is_visible_in_tree()) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } @@ -224,7 +224,7 @@ Size2 BoxContainer::get_minimum_size() const { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } diff --git a/scene/gui/center_container.cpp b/scene/gui/center_container.cpp index f8f9bec3d7..1a72f3ca4d 100644 --- a/scene/gui/center_container.cpp +++ b/scene/gui/center_container.cpp @@ -40,7 +40,7 @@ Size2 CenterContainer::get_minimum_size() const { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } if (!c->is_visible()) { @@ -77,7 +77,7 @@ void CenterContainer::_notification(int p_what) { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index cbe0367c7b..f8a67d154b 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -610,7 +610,7 @@ void ColorPicker::_screen_pick_pressed() { if (!screen) { screen = memnew(Control); r->add_child(screen); - screen->set_as_toplevel(true); + screen->set_as_top_level(true); screen->set_anchors_and_margins_preset(Control::PRESET_WIDE); screen->set_default_cursor_shape(CURSOR_POINTING_HAND); screen->connect("gui_input", callable_mp(this, &ColorPicker::_screen_input)); diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp index a89eef6209..470a7db2dc 100644 --- a/scene/gui/container.cpp +++ b/scene/gui/container.cpp @@ -168,7 +168,7 @@ String Container::get_configuration_warning() const { String warning = Control::get_configuration_warning(); if (get_class() == "Container" && get_script().is_null()) { - if (warning != String()) { + if (!warning.empty()) { warning += "\n\n"; } warning += TTR("Container by itself serves no purpose unless a script configures its children placement behavior.\nIf you don't intend to add a script, use a plain Control node instead."); diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 2cdee4641e..476dccab7e 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -493,7 +493,7 @@ void Control::_notification(int p_notification) { } CanvasItem *ci = Object::cast_to<CanvasItem>(parent); - if (ci && ci->is_set_as_toplevel()) { + if (ci && ci->is_set_as_top_level()) { subwindow = true; break; } @@ -509,13 +509,13 @@ void Control::_notification(int p_notification) { } if (parent_control && !subwindow) { - //do nothing, has a parent control and not toplevel + //do nothing, has a parent control and not top_level if (data.theme.is_null() && parent_control->data.theme_owner) { data.theme_owner = parent_control->data.theme_owner; notification(NOTIFICATION_THEME_CHANGED); } } else { - //is a regular root control or toplevel + //is a regular root control or top_level data.RI = get_viewport()->_gui_add_root_control(this); } @@ -532,7 +532,7 @@ void Control::_notification(int p_notification) { if (data.parent_canvas_item) { data.parent_canvas_item->disconnect("item_rect_changed", callable_mp(this, &Control::_size_changed)); data.parent_canvas_item = nullptr; - } else if (!is_set_as_toplevel()) { + } else if (!is_set_as_top_level()) { //disconnect viewport get_viewport()->disconnect("size_changed", callable_mp(this, &Control::_size_changed)); } @@ -591,7 +591,7 @@ void Control::_notification(int p_notification) { case NOTIFICATION_VISIBILITY_CHANGED: { if (!is_visible_in_tree()) { if (get_viewport() != nullptr) { - get_viewport()->_gui_hid_control(this); + get_viewport()->_gui_hide_control(this); } //remove key focus @@ -1816,7 +1816,7 @@ void Control::set_focus_mode(FocusMode p_focus_mode) { } static Control *_next_control(Control *p_from) { - if (p_from->is_set_as_toplevel()) { + if (p_from->is_set_as_top_level()) { return nullptr; // can't go above } @@ -1830,7 +1830,7 @@ static Control *_next_control(Control *p_from) { ERR_FAIL_INDEX_V(next, parent->get_child_count(), nullptr); for (int i = (next + 1); i < parent->get_child_count(); i++) { Control *c = Object::cast_to<Control>(parent->get_child(i)); - if (!c || !c->is_visible_in_tree() || c->is_set_as_toplevel()) { + if (!c || !c->is_visible_in_tree() || c->is_set_as_top_level()) { continue; } @@ -1867,7 +1867,7 @@ Control *Control::find_next_valid_focus() const { for (int i = 0; i < from->get_child_count(); i++) { Control *c = Object::cast_to<Control>(from->get_child(i)); - if (!c || !c->is_visible_in_tree() || c->is_set_as_toplevel()) { + if (!c || !c->is_visible_in_tree() || c->is_set_as_top_level()) { continue; } @@ -1879,7 +1879,7 @@ Control *Control::find_next_valid_focus() const { next_child = _next_control(from); if (!next_child) { //nothing else.. go up and find either window or subwindow next_child = const_cast<Control *>(this); - while (next_child && !next_child->is_set_as_toplevel()) { + while (next_child && !next_child->is_set_as_top_level()) { next_child = cast_to<Control>(next_child->get_parent()); } @@ -1915,7 +1915,7 @@ static Control *_prev_control(Control *p_from) { Control *child = nullptr; for (int i = p_from->get_child_count() - 1; i >= 0; i--) { Control *c = Object::cast_to<Control>(p_from->get_child(i)); - if (!c || !c->is_visible_in_tree() || c->is_set_as_toplevel()) { + if (!c || !c->is_visible_in_tree() || c->is_set_as_top_level()) { continue; } @@ -1955,7 +1955,7 @@ Control *Control::find_prev_valid_focus() const { Control *prev_child = nullptr; - if (from->is_set_as_toplevel() || !Object::cast_to<Control>(from->get_parent())) { + if (from->is_set_as_top_level() || !Object::cast_to<Control>(from->get_parent())) { //find last of the children prev_child = _prev_control(from); @@ -1964,7 +1964,7 @@ Control *Control::find_prev_valid_focus() const { for (int i = (from->get_index() - 1); i >= 0; i--) { Control *c = Object::cast_to<Control>(from->get_parent()->get_child(i)); - if (!c || !c->is_visible_in_tree() || c->is_set_as_toplevel()) { + if (!c || !c->is_visible_in_tree() || c->is_set_as_top_level()) { continue; } @@ -2023,8 +2023,8 @@ void Control::release_focus() { update(); } -bool Control::is_toplevel_control() const { - return is_inside_tree() && (!data.parent_canvas_item && !data.RI && is_set_as_toplevel()); +bool Control::is_top_level_control() const { + return is_inside_tree() && (!data.parent_canvas_item && !data.RI && is_set_as_top_level()); } void Control::_propagate_theme_changed(Node *p_at, Control *p_owner, Window *p_owner_window, bool p_assign) { @@ -2374,7 +2374,7 @@ void Control::minimum_size_changed() { //invalidate cache upwards while (invalidate && invalidate->data.minimum_size_valid) { invalidate->data.minimum_size_valid = false; - if (invalidate->is_set_as_toplevel()) { + if (invalidate->is_set_as_top_level()) { break; // do not go further up } if (!invalidate->data.parent && get_parent()) { @@ -2499,7 +2499,7 @@ Control *Control::get_root_parent_control() const { if (c) { root = c; - if (c->data.RI || c->is_toplevel_control()) { + if (c->data.RI || c->is_top_level_control()) { break; } } @@ -2560,7 +2560,7 @@ String Control::get_configuration_warning() const { String warning = CanvasItem::get_configuration_warning(); if (data.mouse_filter == MOUSE_FILTER_IGNORE && data.tooltip != "") { - if (warning != String()) { + if (!warning.empty()) { warning += "\n\n"; } warning += TTR("The Hint Tooltip won't be displayed as the control's Mouse Filter is set to \"Ignore\". To solve this, set the Mouse Filter to \"Stop\" or \"Pass\"."); diff --git a/scene/gui/control.h b/scene/gui/control.h index 15e10df0c6..83e79f908f 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -464,7 +464,7 @@ public: virtual Transform2D get_transform() const override; - bool is_toplevel_control() const; + bool is_top_level_control() const; Size2 get_parent_area_size() const; Rect2 get_parent_anchorable_rect() const; diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index 9077bfa4ba..430e98d50e 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -181,7 +181,7 @@ void AcceptDialog::_update_child_rects() { continue; } - if (c == hbc || c == label || c == bg || c->is_set_as_toplevel()) { + if (c == hbc || c == label || c == bg || c->is_set_as_top_level()) { continue; } @@ -209,7 +209,7 @@ Size2 AcceptDialog::_get_contents_minimum_size() const { continue; } - if (c == hbc || c == label || c->is_set_as_toplevel()) { + if (c == hbc || c == label || c->is_set_as_top_level()) { continue; } diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index 4aea2928f4..2da61bdde7 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -936,7 +936,7 @@ FileDialog::FileDialog() { filter->connect("item_selected", callable_mp(this, &FileDialog::_filter_selected)); confirm_save = memnew(ConfirmationDialog); - // confirm_save->set_as_toplevel(true); + // confirm_save->set_as_top_level(true); add_child(confirm_save); confirm_save->connect("confirmed", callable_mp(this, &FileDialog::_save_confirm_pressed)); diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 467d252c81..a7c15e7027 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -547,7 +547,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) { } bool GraphEdit::_check_clickable_control(Control *p_control, const Vector2 &pos) { - if (p_control->is_set_as_toplevel() || !p_control->is_visible()) { + if (p_control->is_set_as_top_level() || !p_control->is_visible()) { return false; } diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index 01b54ddaa8..38bf31830f 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -102,7 +102,7 @@ void GraphNode::_get_property_list(List<PropertyInfo> *p_list) const { int idx = 0; for (int i = 0; i < get_child_count(); i++) { Control *c = Object::cast_to<Control>(get_child(i)); - if (!c || c->is_set_as_toplevel()) { + if (!c || c->is_set_as_top_level()) { continue; } @@ -131,7 +131,7 @@ void GraphNode::_resort() { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } @@ -156,7 +156,7 @@ void GraphNode::_resort() { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } @@ -388,7 +388,7 @@ Size2 GraphNode::get_minimum_size() const { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } @@ -477,7 +477,7 @@ void GraphNode::_connpos_update() { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } diff --git a/scene/gui/margin_container.cpp b/scene/gui/margin_container.cpp index 0299065f77..b674b492d8 100644 --- a/scene/gui/margin_container.cpp +++ b/scene/gui/margin_container.cpp @@ -43,7 +43,7 @@ Size2 MarginContainer::get_minimum_size() const { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } if (!c->is_visible()) { @@ -80,7 +80,7 @@ void MarginContainer::_notification(int p_what) { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } diff --git a/scene/gui/panel_container.cpp b/scene/gui/panel_container.cpp index 9abdfac009..051b4de825 100644 --- a/scene/gui/panel_container.cpp +++ b/scene/gui/panel_container.cpp @@ -45,7 +45,7 @@ Size2 PanelContainer::get_minimum_size() const { if (!c || !c->is_visible()) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } @@ -95,7 +95,7 @@ void PanelContainer::_notification(int p_what) { if (!c || !c->is_visible_in_tree()) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp index 8a65aa5032..de866fa956 100644 --- a/scene/gui/popup.cpp +++ b/scene/gui/popup.cpp @@ -191,7 +191,7 @@ Size2 PopupPanel::_get_contents_minimum_size() const { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } @@ -215,7 +215,7 @@ void PopupPanel::_update_child_rects() { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index bc70809ad5..578d8a96e8 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -305,12 +305,14 @@ void PopupMenu::_gui_input(const Ref<InputEvent> &p_event) { during_grabbed_click = false; initial_button_mask = 0; - int over = _get_mouse_over(b->get_position()); - - if (invalidated_click) { - invalidated_click = false; + // Disable clicks under a time threshold to avoid selection right when opening the popup. + uint64_t now = OS::get_singleton()->get_ticks_msec(); + uint64_t diff = now - popup_time_msec; + if (diff < 100) { return; } + + int over = _get_mouse_over(b->get_position()); if (over < 0) { if (!was_during_grabbed_click) { hide(); @@ -338,13 +340,6 @@ void PopupMenu::_gui_input(const Ref<InputEvent> &p_event) { return; } - if (invalidated_click) { - moved += m->get_relative(); - if (moved.length() > 4) { - invalidated_click = false; - } - } - for (List<Rect2>::Element *E = autohide_areas.front(); E; E = E->next()) { if (!Rect2(Point2(), get_size()).has_point(m->get_position()) && E->get().has_point(m->get_position())) { _close_pressed(); @@ -1443,7 +1438,7 @@ void PopupMenu::_bind_methods() { void PopupMenu::popup(const Rect2 &p_bounds) { moved = Vector2(); - invalidated_click = true; + popup_time_msec = OS::get_singleton()->get_ticks_msec(); set_as_minsize(); Popup::popup(p_bounds); } @@ -1475,7 +1470,6 @@ PopupMenu::PopupMenu() { submenu_over = -1; initial_button_mask = 0; during_grabbed_click = false; - invalidated_click = false; allow_search = true; search_time_msec = 0; diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h index 9535fd07d7..e8f82ba869 100644 --- a/scene/gui/popup_menu.h +++ b/scene/gui/popup_menu.h @@ -105,7 +105,7 @@ class PopupMenu : public Popup { void _activate_submenu(int over); void _submenu_timeout(); - bool invalidated_click; + uint64_t popup_time_msec = 0; bool hide_on_item_selection; bool hide_on_checkable_item_selection; bool hide_on_multistate_item_selection; diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index 59e26d9e38..bdb9f408f0 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -34,7 +34,7 @@ String Range::get_configuration_warning() const { String warning = Control::get_configuration_warning(); if (shared->exp_ratio && shared->min <= 0) { - if (warning != String()) { + if (!warning.empty()) { warning += "\n\n"; } warning += TTR("If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0."); diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index fb4931ea91..e8acac172c 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -2529,9 +2529,9 @@ bool RichTextLabel::search(const String &p_string, bool p_from_selection, bool p return false; } -void RichTextLabel::selection_copy() { +String RichTextLabel::get_selected_text() { if (!selection.active || !selection.enabled) { - return; + return ""; } String text; @@ -2561,6 +2561,12 @@ void RichTextLabel::selection_copy() { item = _get_next_item(item, true); } + return text; +} + +void RichTextLabel::selection_copy() { + String text = get_selected_text(); + if (text != "") { DisplayServer::get_singleton()->clipboard_set(text); } diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h index 2bda7c7fce..c5ed1cb3ef 100644 --- a/scene/gui/rich_text_label.h +++ b/scene/gui/rich_text_label.h @@ -475,6 +475,7 @@ public: void set_selection_enabled(bool p_enabled); bool is_selection_enabled() const; + String get_selected_text(); void selection_copy(); Error parse_bbcode(const String &p_bbcode); diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index b72b913af0..f4e31c45d2 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -45,7 +45,7 @@ Size2 ScrollContainer::get_minimum_size() const { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } if (c == h_scroll || c == v_scroll) { @@ -285,7 +285,7 @@ void ScrollContainer::_notification(int p_what) { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } if (c == h_scroll || c == v_scroll) { @@ -520,6 +520,8 @@ void ScrollContainer::set_follow_focus(bool p_follow) { } String ScrollContainer::get_configuration_warning() const { + String warning = Container::get_configuration_warning(); + int found = 0; for (int i = 0; i < get_child_count(); i++) { @@ -527,7 +529,7 @@ String ScrollContainer::get_configuration_warning() const { if (!c) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } if (c == h_scroll || c == v_scroll) { @@ -538,10 +540,12 @@ String ScrollContainer::get_configuration_warning() const { } if (found != 1) { - return TTR("ScrollContainer is intended to work with a single child control.\nUse a container as child (VBox, HBox, etc.), or a Control and set the custom minimum size manually."); - } else { - return ""; + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("ScrollContainer is intended to work with a single child control.\nUse a container as child (VBox, HBox, etc.), or a Control and set the custom minimum size manually."); } + return warning; } HScrollBar *ScrollContainer::get_h_scrollbar() { diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp index 5c60153d91..6508be1e43 100644 --- a/scene/gui/split_container.cpp +++ b/scene/gui/split_container.cpp @@ -41,7 +41,7 @@ Control *SplitContainer::_getch(int p_idx) const { if (!c || !c->is_visible_in_tree()) { continue; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { continue; } diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 41b8fad49d..a1f93094c4 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -478,7 +478,7 @@ void TabContainer::_on_mouse_exited() { int TabContainer::_get_tab_width(int p_index) const { ERR_FAIL_INDEX_V(p_index, get_tab_count(), 0); Control *control = Object::cast_to<Control>(_get_tabs()[p_index]); - if (!control || control->is_set_as_toplevel() || get_tab_hidden(p_index)) { + if (!control || control->is_set_as_top_level() || get_tab_hidden(p_index)) { return 0; } @@ -517,7 +517,7 @@ Vector<Control *> TabContainer::_get_tabs() const { Vector<Control *> controls; for (int i = 0; i < get_child_count(); i++) { Control *control = Object::cast_to<Control>(get_child(i)); - if (!control || control->is_toplevel_control()) { + if (!control || control->is_top_level_control()) { continue; } @@ -537,7 +537,7 @@ void TabContainer::add_child_notify(Node *p_child) { if (!c) { return; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { return; } diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index f6636cf392..2f5ee20373 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -1208,8 +1208,9 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2 if (drop_mode_flags && drop_mode_over == p_item) { Rect2 r = cell_rect; + bool has_parent = p_item->get_children() != nullptr; - if (drop_mode_section == -1 || drop_mode_section == 0) { + if (drop_mode_section == -1 || has_parent || drop_mode_section == 0) { RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(r.position.x, r.position.y, r.size.x, 1), cache.drop_position_color); } @@ -1218,7 +1219,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2 RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(r.position.x + r.size.x - 1, r.position.y, 1, r.size.y), cache.drop_position_color); } - if (drop_mode_section == 1 || drop_mode_section == 0) { + if ((drop_mode_section == 1 && !has_parent) || drop_mode_section == 0) { RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(r.position.x, r.position.y + r.size.y, r.size.x, 1), cache.drop_position_color); } } @@ -3891,7 +3892,7 @@ Tree::Tree() { popup_menu = memnew(PopupMenu); popup_menu->hide(); add_child(popup_menu); - // popup_menu->set_as_toplevel(true); + // popup_menu->set_as_top_level(true); popup_editor = memnew(Popup); popup_editor->set_wrap_controls(true); diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp index 5cd45ea408..0d9d9d6356 100644 --- a/scene/main/canvas_item.cpp +++ b/scene/main/canvas_item.cpp @@ -371,7 +371,7 @@ void CanvasItem::_propagate_visibility_changed(bool p_visible) { for (int i = 0; i < get_child_count(); i++) { CanvasItem *c = Object::cast_to<CanvasItem>(get_child(i)); - if (c && c->visible) { //should the toplevels stop propagation? i think so but.. + if (c && c->visible) { //should the top_levels stop propagation? i think so but.. c->_propagate_visibility_changed(p_visible); } } @@ -486,7 +486,7 @@ Transform2D CanvasItem::get_global_transform() const { return global_transform; } -void CanvasItem::_toplevel_raise_self() { +void CanvasItem::_top_level_raise_self() { if (!is_inside_tree()) { return; } @@ -499,7 +499,7 @@ void CanvasItem::_toplevel_raise_self() { } void CanvasItem::_enter_canvas() { - if ((!Object::cast_to<CanvasItem>(get_parent())) || toplevel) { + if ((!Object::cast_to<CanvasItem>(get_parent())) || top_level) { Node *n = this; canvas_layer = nullptr; @@ -533,7 +533,7 @@ void CanvasItem::_enter_canvas() { get_viewport()->gui_reset_canvas_sort_index(); } - get_tree()->call_group_flags(SceneTree::GROUP_CALL_UNIQUE, group, "_toplevel_raise_self"); + get_tree()->call_group_flags(SceneTree::GROUP_CALL_UNIQUE, group, "_top_level_raise_self"); } else { CanvasItem *parent = get_parent_item(); @@ -599,7 +599,7 @@ void CanvasItem::_notification(int p_what) { } if (group != "") { - get_tree()->call_group_flags(SceneTree::GROUP_CALL_UNIQUE, group, "_toplevel_raise_self"); + get_tree()->call_group_flags(SceneTree::GROUP_CALL_UNIQUE, group, "_top_level_raise_self"); } else { CanvasItem *p = get_parent_item(); ERR_FAIL_COND(!p); @@ -674,27 +674,27 @@ Color CanvasItem::get_modulate() const { return modulate; } -void CanvasItem::set_as_toplevel(bool p_toplevel) { - if (toplevel == p_toplevel) { +void CanvasItem::set_as_top_level(bool p_top_level) { + if (top_level == p_top_level) { return; } if (!is_inside_tree()) { - toplevel = p_toplevel; + top_level = p_top_level; return; } _exit_canvas(); - toplevel = p_toplevel; + top_level = p_top_level; _enter_canvas(); } -bool CanvasItem::is_set_as_toplevel() const { - return toplevel; +bool CanvasItem::is_set_as_top_level() const { + return top_level; } CanvasItem *CanvasItem::get_parent_item() const { - if (toplevel) { + if (top_level) { return nullptr; } @@ -967,7 +967,7 @@ void CanvasItem::_notify_transform(CanvasItem *p_node) { for (List<CanvasItem *>::Element *E = p_node->children_items.front(); E; E = E->next()) { CanvasItem *ci = E->get(); - if (ci->toplevel) { + if (ci->top_level) { continue; } _notify_transform(ci); @@ -997,9 +997,9 @@ ObjectID CanvasItem::get_canvas_layer_instance_id() const { } } -CanvasItem *CanvasItem::get_toplevel() const { +CanvasItem *CanvasItem::get_top_level() const { CanvasItem *ci = const_cast<CanvasItem *>(this); - while (!ci->toplevel && Object::cast_to<CanvasItem>(ci->get_parent())) { + while (!ci->top_level && Object::cast_to<CanvasItem>(ci->get_parent())) { ci = Object::cast_to<CanvasItem>(ci->get_parent()); } @@ -1009,7 +1009,7 @@ CanvasItem *CanvasItem::get_toplevel() const { Ref<World2D> CanvasItem::get_world_2d() const { ERR_FAIL_COND_V(!is_inside_tree(), Ref<World2D>()); - CanvasItem *tl = get_toplevel(); + CanvasItem *tl = get_top_level(); if (tl->get_viewport()) { return tl->get_viewport()->find_world_2d(); @@ -1104,7 +1104,7 @@ void CanvasItem::force_update_transform() { } void CanvasItem::_bind_methods() { - ClassDB::bind_method(D_METHOD("_toplevel_raise_self"), &CanvasItem::_toplevel_raise_self); + ClassDB::bind_method(D_METHOD("_top_level_raise_self"), &CanvasItem::_top_level_raise_self); ClassDB::bind_method(D_METHOD("_update_callback"), &CanvasItem::_update_callback); #ifdef TOOLS_ENABLED @@ -1136,8 +1136,8 @@ void CanvasItem::_bind_methods() { ClassDB::bind_method(D_METHOD("update"), &CanvasItem::update); - ClassDB::bind_method(D_METHOD("set_as_toplevel", "enable"), &CanvasItem::set_as_toplevel); - ClassDB::bind_method(D_METHOD("is_set_as_toplevel"), &CanvasItem::is_set_as_toplevel); + ClassDB::bind_method(D_METHOD("set_as_top_level", "enable"), &CanvasItem::set_as_top_level); + ClassDB::bind_method(D_METHOD("is_set_as_top_level"), &CanvasItem::is_set_as_top_level); ClassDB::bind_method(D_METHOD("set_light_mask", "light_mask"), &CanvasItem::set_light_mask); ClassDB::bind_method(D_METHOD("get_light_mask"), &CanvasItem::get_light_mask); @@ -1218,6 +1218,7 @@ void CanvasItem::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::COLOR, "modulate"), "set_modulate", "get_modulate"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "self_modulate"), "set_self_modulate", "get_self_modulate"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_behind_parent"), "set_draw_behind_parent", "is_draw_behind_parent_enabled"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "top_level"), "set_as_top_level", "is_set_as_top_level"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_on_top", PROPERTY_HINT_NONE, "", 0), "_set_on_top", "_is_on_top"); //compatibility ADD_PROPERTY(PropertyInfo(Variant::INT, "light_mask", PROPERTY_HINT_LAYERS_2D_RENDER), "set_light_mask", "get_light_mask"); @@ -1228,8 +1229,6 @@ void CanvasItem::_bind_methods() { ADD_GROUP("Material", ""); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material", PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial,CanvasItemMaterial"), "set_material", "get_material"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_parent_material"), "set_use_parent_material", "get_use_parent_material"); - //exporting these things doesn't really make much sense i think - // ADD_PROPERTY(PropertyInfo(Variant::BOOL, "toplevel", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_as_toplevel", "is_set_as_toplevel"); // ADD_PROPERTY(PropertyInfo(Variant::BOOL,"transform/notify"),"set_transform_notify","is_transform_notify_enabled"); ADD_SIGNAL(MethodInfo("draw")); @@ -1355,7 +1354,7 @@ void CanvasItem::_update_texture_filter_changed(bool p_propagate) { if (p_propagate) { for (List<CanvasItem *>::Element *E = children_items.front(); E; E = E->next()) { - if (!E->get()->toplevel && E->get()->texture_filter == TEXTURE_FILTER_PARENT_NODE) { + if (!E->get()->top_level && E->get()->texture_filter == TEXTURE_FILTER_PARENT_NODE) { E->get()->_update_texture_filter_changed(true); } } @@ -1369,6 +1368,7 @@ void CanvasItem::set_texture_filter(TextureFilter p_texture_filter) { } texture_filter = p_texture_filter; _update_texture_filter_changed(true); + _change_notify(); } CanvasItem::TextureFilter CanvasItem::get_texture_filter() const { @@ -1407,7 +1407,7 @@ void CanvasItem::_update_texture_repeat_changed(bool p_propagate) { update(); if (p_propagate) { for (List<CanvasItem *>::Element *E = children_items.front(); E; E = E->next()) { - if (!E->get()->toplevel && E->get()->texture_repeat == TEXTURE_REPEAT_PARENT_NODE) { + if (!E->get()->top_level && E->get()->texture_repeat == TEXTURE_REPEAT_PARENT_NODE) { E->get()->_update_texture_repeat_changed(true); } } @@ -1421,6 +1421,7 @@ void CanvasItem::set_texture_repeat(TextureRepeat p_texture_repeat) { } texture_repeat = p_texture_repeat; _update_texture_repeat_changed(true); + _change_notify(); } CanvasItem::TextureRepeat CanvasItem::get_texture_repeat() const { @@ -1435,7 +1436,7 @@ CanvasItem::CanvasItem() : pending_update = false; modulate = Color(1, 1, 1, 1); self_modulate = Color(1, 1, 1, 1); - toplevel = false; + top_level = false; first_draw = false; drawing = false; behind = false; diff --git a/scene/main/canvas_item.h b/scene/main/canvas_item.h index d9ffe770ff..a331cb96a9 100644 --- a/scene/main/canvas_item.h +++ b/scene/main/canvas_item.h @@ -201,7 +201,7 @@ private: bool first_draw; bool visible; bool pending_update; - bool toplevel; + bool top_level; bool drawing; bool block_transform_notify; bool behind; @@ -220,7 +220,7 @@ private: mutable Transform2D global_transform; mutable bool global_invalid; - void _toplevel_raise_self(); + void _top_level_raise_self(); void _propagate_visibility_changed(bool p_visible); @@ -355,8 +355,8 @@ public: /* RECT / TRANSFORM */ - void set_as_toplevel(bool p_toplevel); - bool is_set_as_toplevel() const; + void set_as_top_level(bool p_top_level); + bool is_set_as_top_level() const; void set_draw_behind_parent(bool p_enable); bool is_draw_behind_parent_enabled() const; @@ -369,7 +369,7 @@ public: virtual Transform2D get_global_transform_with_canvas() const; virtual Transform2D get_screen_transform() const; - CanvasItem *get_toplevel() const; + CanvasItem *get_top_level() const; _FORCE_INLINE_ RID get_canvas_item() const { return canvas_item; } @@ -405,10 +405,10 @@ public: void force_update_transform(); - void set_texture_filter(TextureFilter p_texture_filter); + virtual void set_texture_filter(TextureFilter p_texture_filter); TextureFilter get_texture_filter() const; - void set_texture_repeat(TextureRepeat p_texture_repeat); + virtual void set_texture_repeat(TextureRepeat p_texture_repeat); TextureRepeat get_texture_repeat() const; // Used by control nodes to retrieve the parent's anchorable area diff --git a/scene/main/shader_globals_override.cpp b/scene/main/shader_globals_override.cpp index 726dcb58de..86c08ca6e9 100644 --- a/scene/main/shader_globals_override.cpp +++ b/scene/main/shader_globals_override.cpp @@ -261,11 +261,16 @@ void ShaderGlobalsOverride::_notification(int p_what) { } String ShaderGlobalsOverride::get_configuration_warning() const { + String warning = Node::get_configuration_warning(); + if (!active) { - return TTR("ShaderGlobalsOverride is not active because another node of the same type is in the scene."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("ShaderGlobalsOverride is not active because another node of the same type is in the scene."); } - return String(); + return warning; } void ShaderGlobalsOverride::_bind_methods() { diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index d962171555..3c7475a150 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1493,7 +1493,7 @@ String Viewport::_gui_get_tooltip(Control *p_control, const Vector2 &p_pos, Cont if (p_control->data.mouse_filter == Control::MOUSE_FILTER_STOP) { break; } - if (p_control->is_set_as_toplevel()) { + if (p_control->is_set_as_top_level()) { break; } @@ -1509,7 +1509,7 @@ void Viewport::_gui_show_tooltip() { } Control *which = nullptr; - String tooltip = _gui_get_tooltip(gui.tooltip, gui.tooltip->get_global_transform().xform_inv(gui.tooltip_pos), &which); + String tooltip = _gui_get_tooltip(gui.tooltip, gui.tooltip->get_global_transform().xform_inv(gui.last_mouse_pos), &which); tooltip = tooltip.strip_edges(); if (tooltip.length() == 0) { return; // bye @@ -1620,7 +1620,7 @@ void Viewport::_gui_call_input(Control *p_control, const Ref<InputEvent> &p_inpu } } - if (!control->is_inside_tree() || control->is_set_as_toplevel()) { + if (!control->is_inside_tree() || control->is_set_as_top_level()) { break; } if (gui.key_event_accepted) { @@ -1631,7 +1631,7 @@ void Viewport::_gui_call_input(Control *p_control, const Ref<InputEvent> &p_inpu } } - if (ci->is_set_as_toplevel()) { + if (ci->is_set_as_top_level()) { break; } @@ -1655,7 +1655,7 @@ void Viewport::_gui_call_notification(Control *p_control, int p_what) { break; } - if (!control->is_inside_tree() || control->is_set_as_toplevel()) { + if (!control->is_inside_tree() || control->is_set_as_top_level()) { break; } if (control->data.mouse_filter == Control::MOUSE_FILTER_STOP) { @@ -1663,7 +1663,7 @@ void Viewport::_gui_call_notification(Control *p_control, int p_what) { } } - if (ci->is_set_as_toplevel()) { + if (ci->is_set_as_top_level()) { break; } @@ -1721,7 +1721,7 @@ Control *Viewport::_gui_find_control_at_pos(CanvasItem *p_node, const Point2 &p_ if (!c || !c->clips_input() || c->has_point(matrix.affine_inverse().xform(p_global))) { for (int i = p_node->get_child_count() - 1; i >= 0; i--) { CanvasItem *ci = Object::cast_to<CanvasItem>(p_node->get_child(i)); - if (!ci || ci->is_set_as_toplevel()) { + if (!ci || ci->is_set_as_top_level()) { continue; } @@ -1768,7 +1768,7 @@ bool Viewport::_gui_drop(Control *p_at_control, Point2 p_at_pos, bool p_just_che p_at_pos = ci->get_transform().xform(p_at_pos); - if (ci->is_set_as_toplevel()) { + if (ci->is_set_as_top_level()) { break; } @@ -1865,7 +1865,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { } } - if (ci->is_set_as_toplevel()) { + if (ci->is_set_as_top_level()) { break; } @@ -1993,7 +1993,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { } } - if (ci->is_set_as_toplevel()) { + if (ci->is_set_as_top_level()) { break; } @@ -2105,7 +2105,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { if (c->data.mouse_filter == Control::MOUSE_FILTER_STOP) { break; } - if (c->is_set_as_toplevel()) { + if (c->is_set_as_top_level()) { break; } c = c->get_parent_control(); @@ -2404,7 +2404,7 @@ void Viewport::_gui_set_drag_preview(Control *p_base, Control *p_control) { if (gui.drag_preview) { memdelete(gui.drag_preview); } - p_control->set_as_toplevel(true); + p_control->set_as_top_level(true); p_control->set_position(gui.last_mouse_pos); p_base->get_root_parent_control()->add_child(p_control); //add as child of viewport p_control->raise(); @@ -2422,7 +2422,7 @@ void Viewport::_gui_unfocus_control(Control *p_control) { } } -void Viewport::_gui_hid_control(Control *p_control) { +void Viewport::_gui_hide_control(Control *p_control) { if (gui.mouse_focus == p_control) { _drop_mouse_focus(); } @@ -3093,10 +3093,15 @@ String Viewport::get_configuration_warning() const { return TTR("This viewport is not set as render target. If you intend for it to display its contents directly to the screen, make it a child of a Control so it can obtain a size. Otherwise, make it a RenderTarget and assign its internal texture to some node for display."); }*/ + String warning = Node::get_configuration_warning(); + if (size.x == 0 || size.y == 0) { - return TTR("Viewport size must be greater than 0 to render anything."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("Viewport size must be greater than 0 to render anything."); } - return String(); + return warning; } void Viewport::gui_reset_canvas_sort_index() { diff --git a/scene/main/viewport.h b/scene/main/viewport.h index 52145a7761..878ac47bca 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -387,7 +387,7 @@ private: void _gui_show_tooltip(); void _gui_remove_control(Control *p_control); - void _gui_hid_control(Control *p_control); + void _gui_hide_control(Control *p_control); void _gui_force_drag(Control *p_base, const Variant &p_data, Control *p_control); void _gui_set_drag_preview(Control *p_base, Control *p_control); diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index b8edd70712..92103f3b1d 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -2633,6 +2633,7 @@ void Animation::_bind_methods() { ClassDB::bind_method(D_METHOD("value_track_get_update_mode", "track_idx"), &Animation::value_track_get_update_mode); ClassDB::bind_method(D_METHOD("value_track_get_key_indices", "track_idx", "time_sec", "delta"), &Animation::_value_track_get_key_indices); + ClassDB::bind_method(D_METHOD("value_track_interpolate", "track_idx", "time_sec"), &Animation::value_track_interpolate); ClassDB::bind_method(D_METHOD("method_track_get_key_indices", "track_idx", "time_sec", "delta"), &Animation::_method_track_get_key_indices); ClassDB::bind_method(D_METHOD("method_track_get_name", "track_idx", "key_idx"), &Animation::method_track_get_name); diff --git a/scene/resources/gradient.cpp b/scene/resources/gradient.cpp index 4bcc52776b..b720653f91 100644 --- a/scene/resources/gradient.cpp +++ b/scene/resources/gradient.cpp @@ -129,7 +129,7 @@ void Gradient::add_point(float p_offset, const Color &p_color) { void Gradient::remove_point(int p_index) { ERR_FAIL_INDEX(p_index, points.size()); - ERR_FAIL_COND(points.size() <= 2); + ERR_FAIL_COND(points.size() <= 1); points.remove(p_index); emit_signal(CoreStringNames::get_singleton()->changed); } diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 10f0a040d0..e9606e03e6 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -872,7 +872,6 @@ Array ArrayMesh::_get_surfaces() const { ret.push_back(data); } - print_line("Saving surfaces: " + itos(ret.size())); return ret; } diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index cb201bc539..5e8bfd9387 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -848,7 +848,7 @@ Error SceneState::pack(Node *p_scene) { Map<Node *, int> node_map; Map<Node *, int> nodepath_map; - //if using scene inheritance, pack the scene it inherits from + // If using scene inheritance, pack the scene it inherits from. if (scene->get_scene_inherited_state().is_valid()) { String path = scene->get_scene_inherited_state()->get_path(); Ref<PackedScene> instance = ResourceLoader::load(path); @@ -856,8 +856,8 @@ Error SceneState::pack(Node *p_scene) { base_scene_idx = _vm_get_variant(instance, variant_map); } } - //instanced, only direct sub-scnes are supported of course + // Instanced, only direct sub-scenes are supported of course. Error err = _parse_node(scene, scene, -1, name_map, variant_map, node_map, nodepath_map); if (err) { clear(); diff --git a/scene/resources/physics_material.cpp b/scene/resources/physics_material.cpp index 2a5cd1101a..59bf8c0e13 100644 --- a/scene/resources/physics_material.cpp +++ b/scene/resources/physics_material.cpp @@ -43,9 +43,9 @@ void PhysicsMaterial::_bind_methods() { ClassDB::bind_method(D_METHOD("set_absorbent", "absorbent"), &PhysicsMaterial::set_absorbent); ClassDB::bind_method(D_METHOD("is_absorbent"), &PhysicsMaterial::is_absorbent); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "friction"), "set_friction", "get_friction"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_friction", "get_friction"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rough"), "set_rough", "is_rough"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bounce"), "set_bounce", "get_bounce"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_bounce", "get_bounce"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "absorbent"), "set_absorbent", "is_absorbent"); } diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index d4d8018d43..ba39593690 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -1763,6 +1763,10 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r } for (int i = 0; i < state->get_connection_count(); i++) { + if (i == 0) { + f->store_line(""); + } + String connstr = "[connection"; connstr += " signal=\"" + String(state->get_connection_signal(i)) + "\""; connstr += " from=\"" + String(state->get_connection_source(i).simplified()) + "\""; @@ -1786,7 +1790,10 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r Vector<NodePath> editable_instances = state->get_editable_instances(); for (int i = 0; i < editable_instances.size(); i++) { - f->store_line("\n[editable path=\"" + editable_instances[i].operator String() + "\"]"); + if (i == 0) { + f->store_line(""); + } + f->store_line("[editable path=\"" + editable_instances[i].operator String() + "\"]"); } } diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index 7328fbdb10..cdb0ec5111 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -911,7 +911,7 @@ void StyleBoxFlat::_bind_methods() { ADD_GROUP("Shadow", "shadow_"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "shadow_color"), "set_shadow_color", "get_shadow_color"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_size"), "set_shadow_size", "get_shadow_size"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_size", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_shadow_size", "get_shadow_size"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "shadow_offset"), "set_shadow_offset", "get_shadow_offset"); ADD_GROUP("Anti Aliasing", "anti_aliasing_"); diff --git a/scene/resources/syntax_highlighter.cpp b/scene/resources/syntax_highlighter.cpp index 5d58e71fc5..e7b49892d8 100644 --- a/scene/resources/syntax_highlighter.cpp +++ b/scene/resources/syntax_highlighter.cpp @@ -149,6 +149,13 @@ Dictionary CodeHighlighter::_get_line_syntax_highlighting(int p_line) { color_region_cache[p_line] = -1; int in_region = -1; if (p_line != 0) { + int prev_region_line = p_line - 1; + while (prev_region_line > 0 && !color_region_cache.has(prev_region_line)) { + prev_region_line--; + } + for (int i = prev_region_line; i < p_line - 1; i++) { + get_line_syntax_highlighting(i); + } if (!color_region_cache.has(p_line - 1)) { get_line_syntax_highlighting(p_line - 1); } diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index 803ab265d4..84437faca0 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -65,20 +65,16 @@ bool VisualShaderNode::is_port_separator(int p_index) const { bool VisualShaderNode::is_output_port_connected(int p_port) const { if (connected_output_ports.has(p_port)) { - return connected_output_ports[p_port]; + return connected_output_ports[p_port] > 0; } return false; } void VisualShaderNode::set_output_port_connected(int p_port, bool p_connected) { if (p_connected) { - connected_output_ports[p_port] = true; - ++connected_output_count; + connected_output_ports[p_port]++; } else { - --connected_output_count; - if (connected_output_count == 0) { - connected_output_ports[p_port] = false; - } + connected_output_ports[p_port]--; } } @@ -101,6 +97,14 @@ bool VisualShaderNode::is_code_generated() const { return true; } +bool VisualShaderNode::is_show_prop_names() const { + return false; +} + +bool VisualShaderNode::is_use_prop_slots() const { + return false; +} + Vector<VisualShader::DefaultTextureParam> VisualShaderNode::get_default_texture_parameters(VisualShader::Type p_type, int p_id) const { return Vector<VisualShader::DefaultTextureParam>(); } @@ -2123,6 +2127,15 @@ void VisualShaderNodeUniformRef::clear_uniforms() { uniforms.clear(); } +bool VisualShaderNodeUniformRef::has_uniform(const String &p_name) { + for (List<VisualShaderNodeUniformRef::Uniform>::Element *E = uniforms.front(); E; E = E->next()) { + if (E->get().name == p_name) { + return true; + } + } + return false; +} + String VisualShaderNodeUniformRef::get_caption() const { return "UniformRef"; } @@ -2140,10 +2153,6 @@ String VisualShaderNodeUniformRef::get_input_port_name(int p_port) const { } int VisualShaderNodeUniformRef::get_output_port_count() const { - if (uniform_name == "[None]") { - return 0; - } - switch (uniform_type) { case UniformType::UNIFORM_TYPE_FLOAT: return 1; @@ -2162,7 +2171,7 @@ int VisualShaderNodeUniformRef::get_output_port_count() const { default: break; } - return 0; + return 1; } VisualShaderNodeUniformRef::PortType VisualShaderNodeUniformRef::get_output_port_type(int p_port) const { @@ -2222,8 +2231,8 @@ String VisualShaderNodeUniformRef::get_output_port_name(int p_port) const { void VisualShaderNodeUniformRef::set_uniform_name(const String &p_name) { uniform_name = p_name; - if (p_name != "[None]") { - uniform_type = get_uniform_type_by_name(p_name); + if (uniform_name != "[None]") { + uniform_type = get_uniform_type_by_name(uniform_name); } else { uniform_type = UniformType::UNIFORM_TYPE_FLOAT; } @@ -2264,6 +2273,9 @@ VisualShaderNodeUniformRef::UniformType VisualShaderNodeUniformRef::get_uniform_ String VisualShaderNodeUniformRef::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { switch (uniform_type) { case UniformType::UNIFORM_TYPE_FLOAT: + if (uniform_name == "[None]") { + return "\t" + p_output_vars[0] + " = 0.0;\n"; + } return "\t" + p_output_vars[0] + " = " + get_uniform_name() + ";\n"; case UniformType::UNIFORM_TYPE_INT: return "\t" + p_output_vars[0] + " = " + get_uniform_name() + ";\n"; @@ -2286,16 +2298,29 @@ String VisualShaderNodeUniformRef::generate_code(Shader::Mode p_mode, VisualShad return ""; } +void VisualShaderNodeUniformRef::_set_uniform_type(int p_uniform_type) { + uniform_type = (UniformType)p_uniform_type; +} + +int VisualShaderNodeUniformRef::_get_uniform_type() const { + return (int)uniform_type; +} + void VisualShaderNodeUniformRef::_bind_methods() { ClassDB::bind_method(D_METHOD("set_uniform_name", "name"), &VisualShaderNodeUniformRef::set_uniform_name); ClassDB::bind_method(D_METHOD("get_uniform_name"), &VisualShaderNodeUniformRef::get_uniform_name); + ClassDB::bind_method(D_METHOD("_set_uniform_type", "type"), &VisualShaderNodeUniformRef::_set_uniform_type); + ClassDB::bind_method(D_METHOD("_get_uniform_type"), &VisualShaderNodeUniformRef::_get_uniform_type); + ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "uniform_name", PROPERTY_HINT_ENUM, ""), "set_uniform_name", "get_uniform_name"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "uniform_type", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_uniform_type", "_get_uniform_type"); } Vector<StringName> VisualShaderNodeUniformRef::get_editable_properties() const { Vector<StringName> props; props.push_back("uniform_name"); + props.push_back("uniform_type"); return props; } @@ -2700,6 +2725,7 @@ void VisualShaderNodeGroupBase::add_input_port(int p_id, int p_type, const Strin } _apply_port_changes(); + emit_changed(); } void VisualShaderNodeGroupBase::remove_input_port(int p_id) { @@ -2724,6 +2750,7 @@ void VisualShaderNodeGroupBase::remove_input_port(int p_id) { } _apply_port_changes(); + emit_changed(); } int VisualShaderNodeGroupBase::get_input_port_count() const { @@ -2768,6 +2795,7 @@ void VisualShaderNodeGroupBase::add_output_port(int p_id, int p_type, const Stri } _apply_port_changes(); + emit_changed(); } void VisualShaderNodeGroupBase::remove_output_port(int p_id) { @@ -2792,6 +2820,7 @@ void VisualShaderNodeGroupBase::remove_output_port(int p_id) { } _apply_port_changes(); + emit_changed(); } int VisualShaderNodeGroupBase::get_output_port_count() const { @@ -2838,6 +2867,7 @@ void VisualShaderNodeGroupBase::set_input_port_type(int p_id, int p_type) { inputs = inputs.insert(index, itos(p_type)); _apply_port_changes(); + emit_changed(); } VisualShaderNodeGroupBase::PortType VisualShaderNodeGroupBase::get_input_port_type(int p_id) const { @@ -2873,6 +2903,7 @@ void VisualShaderNodeGroupBase::set_input_port_name(int p_id, const String &p_na inputs = inputs.insert(index, p_name); _apply_port_changes(); + emit_changed(); } String VisualShaderNodeGroupBase::get_input_port_name(int p_id) const { @@ -2908,6 +2939,7 @@ void VisualShaderNodeGroupBase::set_output_port_type(int p_id, int p_type) { outputs = outputs.insert(index, itos(p_type)); _apply_port_changes(); + emit_changed(); } VisualShaderNodeGroupBase::PortType VisualShaderNodeGroupBase::get_output_port_type(int p_id) const { @@ -2943,6 +2975,7 @@ void VisualShaderNodeGroupBase::set_output_port_name(int p_id, const String &p_n outputs = outputs.insert(index, p_name); _apply_port_changes(); + emit_changed(); } String VisualShaderNodeGroupBase::get_output_port_name(int p_id) const { @@ -3053,6 +3086,7 @@ String VisualShaderNodeExpression::get_caption() const { void VisualShaderNodeExpression::set_expression(const String &p_expression) { expression = p_expression; + emit_changed(); } String VisualShaderNodeExpression::get_expression() const { diff --git a/scene/resources/visual_shader.h b/scene/resources/visual_shader.h index 513a17b024..e3d5200e6b 100644 --- a/scene/resources/visual_shader.h +++ b/scene/resources/visual_shader.h @@ -193,8 +193,7 @@ class VisualShaderNode : public Resource { Map<int, Variant> default_input_values; Map<int, bool> connected_input_ports; - Map<int, bool> connected_output_ports; - int connected_output_count = 0; + Map<int, int> connected_output_ports; protected: bool simple_decl = true; @@ -242,6 +241,8 @@ public: virtual bool is_generate_input_var(int p_port) const; virtual bool is_code_generated() const; + virtual bool is_show_prop_names() const; + virtual bool is_use_prop_slots() const; virtual Vector<StringName> get_editable_properties() const; @@ -454,6 +455,7 @@ protected: public: static void add_uniform(const String &p_name, UniformType p_type); static void clear_uniforms(); + static bool has_uniform(const String &p_name); public: virtual String get_caption() const override; @@ -469,6 +471,9 @@ public: void set_uniform_name(const String &p_name); String get_uniform_name() const; + void _set_uniform_type(int p_uniform_type); + int _get_uniform_type() const; + int get_uniforms_count() const; String get_uniform_name_by_index(int p_idx) const; UniformType get_uniform_type_by_name(const String &p_name) const; diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp index 0e10682daf..085c0d0112 100644 --- a/scene/resources/visual_shader_nodes.cpp +++ b/scene/resources/visual_shader_nodes.cpp @@ -452,7 +452,7 @@ String VisualShaderNodeTexture::get_output_port_name(int p_port) const { String VisualShaderNodeTexture::get_input_port_default_hint(int p_port) const { if (p_port == 0) { - return "UV.xy"; + return "default"; } return ""; } @@ -491,15 +491,22 @@ String VisualShaderNodeTexture::generate_global(Shader::Mode p_mode, VisualShade } String VisualShaderNodeTexture::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { + String default_uv; + if (p_mode != Shader::MODE_PARTICLES && p_mode != Shader::MODE_SKY) { + default_uv = "UV.xy"; + } else { + default_uv = "vec2(0.0)"; + } + if (source == SOURCE_TEXTURE) { String id = make_unique_id(p_type, p_id, "tex"); String code; if (p_input_vars[0] == String()) { // Use UV by default. if (p_input_vars[1] == String()) { - code += "\tvec4 " + id + "_read = texture(" + id + ", UV.xy);\n"; + code += "\tvec4 " + id + "_read = texture(" + id + ", " + default_uv + ");\n"; } else { - code += "\tvec4 " + id + "_read = textureLod(" + id + ", UV.xy, " + p_input_vars[1] + ");\n"; + code += "\tvec4 " + id + "_read = textureLod(" + id + ", " + default_uv + ", " + p_input_vars[1] + ");\n"; } } else if (p_input_vars[1] == String()) { @@ -525,9 +532,9 @@ String VisualShaderNodeTexture::generate_code(Shader::Mode p_mode, VisualShader: if (p_input_vars[0] == String()) { // Use UV by default. if (p_input_vars[1] == String()) { - code += "\t\tvec4 " + id + "_tex_read = texture(" + id + ", UV.xy);\n"; + code += "\t\tvec4 " + id + "_tex_read = texture(" + id + ", " + default_uv + ");\n"; } else { - code += "\t\tvec4 " + id + "_tex_read = textureLod(" + id + ", UV.xy, " + p_input_vars[1] + ");\n"; + code += "\t\tvec4 " + id + "_tex_read = textureLod(" + id + ", " + default_uv + ", " + p_input_vars[1] + ");\n"; } } else if (p_input_vars[1] == String()) { @@ -549,9 +556,9 @@ String VisualShaderNodeTexture::generate_code(Shader::Mode p_mode, VisualShader: if (p_input_vars[0] == String() || p_for_preview) { // Use UV by default. if (p_input_vars[1] == String()) { - code += "\t\tvec4 _tex_read = textureLod(SCREEN_TEXTURE, UV.xy, 0.0 );\n"; + code += "\t\tvec4 _tex_read = textureLod(SCREEN_TEXTURE, " + default_uv + ", 0.0 );\n"; } else { - code += "\t\tvec4 _tex_read = textureLod(SCREEN_TEXTURE, UV.xy, " + p_input_vars[1] + ");\n"; + code += "\t\tvec4 _tex_read = textureLod(SCREEN_TEXTURE, " + default_uv + ", " + p_input_vars[1] + ");\n"; } } else if (p_input_vars[1] == String()) { @@ -572,9 +579,9 @@ String VisualShaderNodeTexture::generate_code(Shader::Mode p_mode, VisualShader: if (p_input_vars[0] == String()) { // Use UV by default. if (p_input_vars[1] == String()) { - code += "\t\tvec4 _tex_read = texture(TEXTURE , UV.xy);\n"; + code += "\t\tvec4 _tex_read = texture(TEXTURE, " + default_uv + ");\n"; } else { - code += "\t\tvec4 _tex_read = textureLod(TEXTURE, UV.xy, " + p_input_vars[1] + ");\n"; + code += "\t\tvec4 _tex_read = textureLod(TEXTURE, " + default_uv + ", " + p_input_vars[1] + ");\n"; } } else if (p_input_vars[1] == String()) { @@ -595,9 +602,9 @@ String VisualShaderNodeTexture::generate_code(Shader::Mode p_mode, VisualShader: if (p_input_vars[0] == String()) { // Use UV by default. if (p_input_vars[1] == String()) { - code += "\t\tvec4 _tex_read = texture(NORMAL_TEXTURE, UV.xy);\n"; + code += "\t\tvec4 _tex_read = texture(NORMAL_TEXTURE, " + default_uv + ");\n"; } else { - code += "\t\tvec4 _tex_read = textureLod(NORMAL_TEXTURE, UV.xy, " + p_input_vars[1] + ");\n"; + code += "\t\tvec4 _tex_read = textureLod(NORMAL_TEXTURE, " + default_uv + ", " + p_input_vars[1] + ");\n"; } } else if (p_input_vars[1] == String()) { @@ -628,9 +635,9 @@ String VisualShaderNodeTexture::generate_code(Shader::Mode p_mode, VisualShader: if (p_input_vars[0] == String()) { // Use UV by default. if (p_input_vars[1] == String()) { - code += "\t\tfloat _depth = texture(DEPTH_TEXTURE, UV.xy).r;\n"; + code += "\t\tfloat _depth = texture(DEPTH_TEXTURE, " + default_uv + ").r;\n"; } else { - code += "\t\tfloat _depth = textureLod(DEPTH_TEXTURE, UV.xy, " + p_input_vars[1] + ").r;\n"; + code += "\t\tfloat _depth = textureLod(DEPTH_TEXTURE, " + default_uv + ", " + p_input_vars[1] + ").r;\n"; } } else if (p_input_vars[1] == String()) { @@ -819,12 +826,19 @@ String VisualShaderNodeSample3D::get_output_port_name(int p_port) const { String VisualShaderNodeSample3D::get_input_port_default_hint(int p_port) const { if (p_port == 0) { - return "vec3(UV.xy, 0.0)"; + return "default"; } return ""; } String VisualShaderNodeSample3D::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { + String default_uv; + if (p_mode != Shader::MODE_PARTICLES && p_mode != Shader::MODE_SKY) { + default_uv = "vec3(UV, 0.0)"; + } else { + default_uv = "vec3(0.0)"; + } + String code; if (source == SOURCE_TEXTURE || source == SOURCE_PORT) { String id; @@ -837,9 +851,9 @@ String VisualShaderNodeSample3D::generate_code(Shader::Mode p_mode, VisualShader if (id != String()) { if (p_input_vars[0] == String()) { // Use UV by default. if (p_input_vars[1] == String()) { - code += "\t\tvec4 " + id + "_tex_read = texture(" + id + ", vec3(UV.xy, 0.0));\n"; + code += "\t\tvec4 " + id + "_tex_read = texture(" + id + ", " + default_uv + ");\n"; } else { - code += "\t\tvec4 " + id + "_tex_read = textureLod(" + id + ", vec3(UV.xy, 0.0), " + p_input_vars[1] + ");\n"; + code += "\t\tvec4 " + id + "_tex_read = textureLod(" + id + ", " + default_uv + ", " + p_input_vars[1] + ");\n"; } } else if (p_input_vars[1] == String()) { //no lod @@ -1085,6 +1099,13 @@ String VisualShaderNodeCubemap::generate_global(Shader::Mode p_mode, VisualShade } String VisualShaderNodeCubemap::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { + String default_uv; + if (p_mode != Shader::MODE_PARTICLES && p_mode != Shader::MODE_SKY) { + default_uv = "vec3(UV, 0.0)"; + } else { + default_uv = "vec3(0.0)"; + } + String code; String id; if (source == SOURCE_TEXTURE) { @@ -1108,9 +1129,9 @@ String VisualShaderNodeCubemap::generate_code(Shader::Mode p_mode, VisualShader: if (p_input_vars[0] == String()) { // Use UV by default. if (p_input_vars[1] == String()) { - code += "\t\tvec4 " + id + "_read = texture(" + id + " , vec3(UV, 0.0));\n"; + code += "\t\tvec4 " + id + "_read = texture(" + id + ", " + default_uv + ");\n"; } else { - code += "\t\tvec4 " + id + "_read = textureLod(" + id + " , vec3(UV, 0.0)" + " , " + p_input_vars[1] + " );\n"; + code += "\t\tvec4 " + id + "_read = textureLod(" + id + ", " + default_uv + ", " + p_input_vars[1] + " );\n"; } } else if (p_input_vars[1] == String()) { @@ -1128,7 +1149,7 @@ String VisualShaderNodeCubemap::generate_code(Shader::Mode p_mode, VisualShader: String VisualShaderNodeCubemap::get_input_port_default_hint(int p_port) const { if (p_port == 0) { - return "vec3(UV, 0.0)"; + return "default"; } return ""; } @@ -3490,6 +3511,14 @@ String VisualShaderNodeFloatUniform::generate_code(Shader::Mode p_mode, VisualSh return "\t" + p_output_vars[0] + " = " + get_uniform_name() + ";\n"; } +bool VisualShaderNodeFloatUniform::is_show_prop_names() const { + return true; +} + +bool VisualShaderNodeFloatUniform::is_use_prop_slots() const { + return true; +} + void VisualShaderNodeFloatUniform::set_hint(Hint p_hint) { hint = p_hint; emit_changed(); @@ -3649,6 +3678,14 @@ String VisualShaderNodeIntUniform::generate_code(Shader::Mode p_mode, VisualShad return "\t" + p_output_vars[0] + " = " + get_uniform_name() + ";\n"; } +bool VisualShaderNodeIntUniform::is_show_prop_names() const { + return true; +} + +bool VisualShaderNodeIntUniform::is_use_prop_slots() const { + return true; +} + void VisualShaderNodeIntUniform::set_hint(Hint p_hint) { hint = p_hint; emit_changed(); @@ -3823,6 +3860,14 @@ String VisualShaderNodeBooleanUniform::generate_code(Shader::Mode p_mode, Visual return "\t" + p_output_vars[0] + " = " + get_uniform_name() + ";\n"; } +bool VisualShaderNodeBooleanUniform::is_show_prop_names() const { + return true; +} + +bool VisualShaderNodeBooleanUniform::is_use_prop_slots() const { + return true; +} + void VisualShaderNodeBooleanUniform::_bind_methods() { ClassDB::bind_method(D_METHOD("set_default_value_enabled", "enabled"), &VisualShaderNodeBooleanUniform::set_default_value_enabled); ClassDB::bind_method(D_METHOD("is_default_value_enabled"), &VisualShaderNodeBooleanUniform::is_default_value_enabled); @@ -3913,6 +3958,10 @@ String VisualShaderNodeColorUniform::generate_code(Shader::Mode p_mode, VisualSh return code; } +bool VisualShaderNodeColorUniform::is_show_prop_names() const { + return true; +} + void VisualShaderNodeColorUniform::_bind_methods() { ClassDB::bind_method(D_METHOD("set_default_value_enabled", "enabled"), &VisualShaderNodeColorUniform::set_default_value_enabled); ClassDB::bind_method(D_METHOD("is_default_value_enabled"), &VisualShaderNodeColorUniform::is_default_value_enabled); @@ -4012,6 +4061,14 @@ void VisualShaderNodeVec3Uniform::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "default_value"), "set_default_value", "get_default_value"); } +bool VisualShaderNodeVec3Uniform::is_show_prop_names() const { + return true; +} + +bool VisualShaderNodeVec3Uniform::is_use_prop_slots() const { + return true; +} + bool VisualShaderNodeVec3Uniform::is_qualifier_supported(Qualifier p_qual) const { return true; // all qualifiers are supported } @@ -4104,6 +4161,14 @@ void VisualShaderNodeTransformUniform::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "default_value"), "set_default_value", "get_default_value"); } +bool VisualShaderNodeTransformUniform::is_show_prop_names() const { + return true; +} + +bool VisualShaderNodeTransformUniform::is_use_prop_slots() const { + return true; +} + bool VisualShaderNodeTransformUniform::is_qualifier_supported(Qualifier p_qual) const { return true; // all qualifiers are supported } @@ -4202,13 +4267,20 @@ bool VisualShaderNodeTextureUniform::is_code_generated() const { } String VisualShaderNodeTextureUniform::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { + String default_uv; + if (p_mode != Shader::MODE_PARTICLES && p_mode != Shader::MODE_SKY) { + default_uv = "UV.xy"; + } else { + default_uv = "vec2(0.0)"; + } + String id = get_uniform_name(); String code = "\t{\n"; if (p_input_vars[0] == String()) { // Use UV by default. if (p_input_vars[1] == String()) { - code += "\t\tvec4 n_tex_read = texture(" + id + ", UV.xy);\n"; + code += "\t\tvec4 n_tex_read = texture(" + id + ", " + default_uv + ");\n"; } else { - code += "\t\tvec4 n_tex_read = textureLod(" + id + ", UV.xy, " + p_input_vars[1] + ");\n"; + code += "\t\tvec4 n_tex_read = textureLod(" + id + ", " + default_uv + ", " + p_input_vars[1] + ");\n"; } } else if (p_input_vars[1] == String()) { //no lod @@ -4269,7 +4341,7 @@ void VisualShaderNodeTextureUniform::_bind_methods() { String VisualShaderNodeTextureUniform::get_input_port_default_hint(int p_port) const { if (p_port == 0) { - return "UV.xy"; + return "default"; } return ""; } @@ -5169,7 +5241,7 @@ int VisualShaderNodeMultiplyAdd::get_input_port_count() const { } VisualShaderNodeMultiplyAdd::PortType VisualShaderNodeMultiplyAdd::get_input_port_type(int p_port) const { - if (type == TYPE_SCALAR) { + if (op_type == OP_TYPE_SCALAR) { return PORT_TYPE_SCALAR; } return PORT_TYPE_VECTOR; @@ -5191,7 +5263,7 @@ int VisualShaderNodeMultiplyAdd::get_output_port_count() const { } VisualShaderNodeMultiplyAdd::PortType VisualShaderNodeMultiplyAdd::get_output_port_type(int p_port) const { - if (type == TYPE_SCALAR) { + if (op_type == OP_TYPE_SCALAR) { return PORT_TYPE_SCALAR; } else { return PORT_TYPE_VECTOR; @@ -5206,10 +5278,10 @@ String VisualShaderNodeMultiplyAdd::generate_code(Shader::Mode p_mode, VisualSha return "\t" + p_output_vars[0] + " = fma(" + p_input_vars[0] + ", " + p_input_vars[1] + ", " + p_input_vars[2] + ");\n"; } -void VisualShaderNodeMultiplyAdd::set_type(Type p_type) { - ERR_FAIL_INDEX((int)p_type, TYPE_MAX); - if (p_type != type) { - if (p_type == TYPE_SCALAR) { +void VisualShaderNodeMultiplyAdd::set_op_type(OpType p_op_type) { + ERR_FAIL_INDEX((int)p_op_type, OP_TYPE_MAX); + if (p_op_type != op_type) { + if (p_op_type == OP_TYPE_SCALAR) { set_input_port_default_value(0, 0.0); set_input_port_default_value(1, 0.0); set_input_port_default_value(2, 0.0); @@ -5219,29 +5291,29 @@ void VisualShaderNodeMultiplyAdd::set_type(Type p_type) { set_input_port_default_value(2, Vector3(0.0, 0.0, 0.0)); } } - type = p_type; + op_type = p_op_type; emit_changed(); } -VisualShaderNodeMultiplyAdd::Type VisualShaderNodeMultiplyAdd::get_type() const { - return type; +VisualShaderNodeMultiplyAdd::OpType VisualShaderNodeMultiplyAdd::get_op_type() const { + return op_type; } Vector<StringName> VisualShaderNodeMultiplyAdd::get_editable_properties() const { Vector<StringName> props; - props.push_back("type"); + props.push_back("op_type"); return props; } void VisualShaderNodeMultiplyAdd::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_type", "type"), &VisualShaderNodeMultiplyAdd::set_type); - ClassDB::bind_method(D_METHOD("get_type"), &VisualShaderNodeMultiplyAdd::get_type); + ClassDB::bind_method(D_METHOD("set_op_type", "type"), &VisualShaderNodeMultiplyAdd::set_op_type); + ClassDB::bind_method(D_METHOD("get_op_type"), &VisualShaderNodeMultiplyAdd::get_op_type); - ADD_PROPERTY(PropertyInfo(Variant::INT, "type", PROPERTY_HINT_ENUM, "Scalar,Vector"), "set_type", "get_type"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "op_type", PROPERTY_HINT_ENUM, "Scalar,Vector"), "set_op_type", "get_op_type"); - BIND_ENUM_CONSTANT(TYPE_SCALAR); - BIND_ENUM_CONSTANT(TYPE_VECTOR); - BIND_ENUM_CONSTANT(TYPE_MAX); + BIND_ENUM_CONSTANT(OP_TYPE_SCALAR); + BIND_ENUM_CONSTANT(OP_TYPE_VECTOR); + BIND_ENUM_CONSTANT(OP_TYPE_MAX); } VisualShaderNodeMultiplyAdd::VisualShaderNodeMultiplyAdd() { diff --git a/scene/resources/visual_shader_nodes.h b/scene/resources/visual_shader_nodes.h index 06ad42adf5..95042f8e56 100644 --- a/scene/resources/visual_shader_nodes.h +++ b/scene/resources/visual_shader_nodes.h @@ -1529,6 +1529,9 @@ public: virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override; virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty + virtual bool is_show_prop_names() const override; + virtual bool is_use_prop_slots() const override; + void set_hint(Hint p_hint); Hint get_hint() const; @@ -1591,6 +1594,9 @@ public: virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override; virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty + virtual bool is_show_prop_names() const override; + virtual bool is_use_prop_slots() const override; + void set_hint(Hint p_hint); Hint get_hint() const; @@ -1644,6 +1650,9 @@ public: virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override; virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty + virtual bool is_show_prop_names() const override; + virtual bool is_use_prop_slots() const override; + void set_default_value_enabled(bool p_enabled); bool is_default_value_enabled() const; @@ -1683,6 +1692,8 @@ public: virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override; virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty + virtual bool is_show_prop_names() const override; + void set_default_value_enabled(bool p_enabled); bool is_default_value_enabled() const; @@ -1722,6 +1733,9 @@ public: virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override; virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty + virtual bool is_show_prop_names() const override; + virtual bool is_use_prop_slots() const override; + void set_default_value_enabled(bool p_enabled); bool is_default_value_enabled() const; @@ -1761,6 +1775,9 @@ public: virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override; virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty + virtual bool is_show_prop_names() const override; + virtual bool is_use_prop_slots() const override; + void set_default_value_enabled(bool p_enabled); bool is_default_value_enabled() const; @@ -2121,14 +2138,14 @@ class VisualShaderNodeMultiplyAdd : public VisualShaderNode { GDCLASS(VisualShaderNodeMultiplyAdd, VisualShaderNode); public: - enum Type { - TYPE_SCALAR, - TYPE_VECTOR, - TYPE_MAX, + enum OpType { + OP_TYPE_SCALAR, + OP_TYPE_VECTOR, + OP_TYPE_MAX, }; protected: - Type type = TYPE_SCALAR; + OpType op_type = OP_TYPE_SCALAR; protected: static void _bind_methods(); @@ -2146,14 +2163,14 @@ public: virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty - void set_type(Type p_type); - Type get_type() const; + void set_op_type(OpType p_type); + OpType get_op_type() const; virtual Vector<StringName> get_editable_properties() const override; VisualShaderNodeMultiplyAdd(); }; -VARIANT_ENUM_CAST(VisualShaderNodeMultiplyAdd::Type) +VARIANT_ENUM_CAST(VisualShaderNodeMultiplyAdd::OpType) #endif // VISUAL_SHADER_NODES_H diff --git a/servers/display_server.cpp b/servers/display_server.cpp index 8f6d6d3b99..356f4b884a 100644 --- a/servers/display_server.cpp +++ b/servers/display_server.cpp @@ -194,6 +194,10 @@ void DisplayServer::delete_sub_window(WindowID p_id) { ERR_FAIL_MSG("Sub-windows not supported by this display server."); } +void DisplayServer::window_set_mouse_passthrough(const Vector<Vector2> &p_region, WindowID p_window) { + ERR_FAIL_MSG("Mouse passthrough not supported by this display server."); +} + void DisplayServer::window_set_ime_active(const bool p_active, WindowID p_window) { WARN_PRINT("IME not supported by this display server."); } @@ -412,6 +416,7 @@ void DisplayServer::_bind_methods() { ClassDB::bind_method(D_METHOD("delete_sub_window", "window_id"), &DisplayServer::delete_sub_window); ClassDB::bind_method(D_METHOD("window_set_title", "title", "window_id"), &DisplayServer::window_set_title, DEFVAL(MAIN_WINDOW_ID)); + ClassDB::bind_method(D_METHOD("window_set_mouse_passthrough", "region", "window_id"), &DisplayServer::window_set_mouse_passthrough, DEFVAL(MAIN_WINDOW_ID)); ClassDB::bind_method(D_METHOD("window_get_current_screen", "window_id"), &DisplayServer::window_get_current_screen, DEFVAL(MAIN_WINDOW_ID)); ClassDB::bind_method(D_METHOD("window_set_current_screen", "screen", "window_id"), &DisplayServer::window_set_current_screen, DEFVAL(MAIN_WINDOW_ID)); diff --git a/servers/display_server.h b/servers/display_server.h index b652418244..3ee0da709b 100644 --- a/servers/display_server.h +++ b/servers/display_server.h @@ -247,6 +247,8 @@ public: virtual void window_set_title(const String &p_title, WindowID p_window = MAIN_WINDOW_ID) = 0; + virtual void window_set_mouse_passthrough(const Vector<Vector2> &p_region, WindowID p_window = MAIN_WINDOW_ID); + virtual int window_get_current_screen(WindowID p_window = MAIN_WINDOW_ID) const = 0; virtual void window_set_current_screen(int p_screen, WindowID p_window = MAIN_WINDOW_ID) = 0; diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp index 856bba78f7..75c9a95739 100644 --- a/servers/physics_2d/body_2d_sw.cpp +++ b/servers/physics_2d/body_2d_sw.cpp @@ -468,7 +468,7 @@ void Body2DSW::integrate_forces(real_t p_step) { linear_velocity = motion / p_step; real_t rot = new_transform.get_rotation() - get_transform().get_rotation(); - angular_velocity = rot / p_step; + angular_velocity = remainder(rot, 2.0 * Math_PI) / p_step; do_motion = true; diff --git a/servers/physics_2d/collision_solver_2d_sw.cpp b/servers/physics_2d/collision_solver_2d_sw.cpp index beba709807..0e056691c7 100644 --- a/servers/physics_2d/collision_solver_2d_sw.cpp +++ b/servers/physics_2d/collision_solver_2d_sw.cpp @@ -47,7 +47,7 @@ bool CollisionSolver2DSW::solve_static_line(const Shape2DSW *p_shape_A, const Tr Vector2 supports[2]; int support_count; - p_shape_B->get_supports(p_transform_A.affine_inverse().basis_xform(-n).normalized(), supports, support_count); + p_shape_B->get_supports(p_transform_B.affine_inverse().basis_xform(-n).normalized(), supports, support_count); bool found = false; diff --git a/servers/physics_2d/physics_server_2d_sw.cpp b/servers/physics_2d/physics_server_2d_sw.cpp index ffdaab0d92..1b396190e9 100644 --- a/servers/physics_2d/physics_server_2d_sw.cpp +++ b/servers/physics_2d/physics_server_2d_sw.cpp @@ -1342,6 +1342,10 @@ PhysicsServer2DSW::PhysicsServer2DSW() { island_count = 0; active_objects = 0; collision_pairs = 0; +#ifdef NO_THREADS + using_threads = false; +#else using_threads = int(ProjectSettings::get_singleton()->get("physics/2d/thread_model")) == 2; +#endif flushing_queries = false; }; diff --git a/servers/physics_2d/physics_server_2d_wrap_mt.h b/servers/physics_2d/physics_server_2d_wrap_mt.h index bc918b20f4..586dbe9e12 100644 --- a/servers/physics_2d/physics_server_2d_wrap_mt.h +++ b/servers/physics_2d/physics_server_2d_wrap_mt.h @@ -317,6 +317,9 @@ public: template <class T> static PhysicsServer2D *init_server() { +#ifdef NO_THREADS + return memnew(T); // Always single unsafe when no threads are available. +#else int tm = GLOBAL_DEF("physics/2d/thread_model", 1); if (tm == 0) { // single unsafe return memnew(T); @@ -325,6 +328,7 @@ public: } else { // multi threaded return memnew(PhysicsServer2DWrapMT(memnew(T), true)); } +#endif } #undef ServerNameWrapMT diff --git a/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp b/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp index a13e7d786b..db2c707984 100644 --- a/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp +++ b/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp @@ -5871,7 +5871,7 @@ RID RasterizerStorageRD::decal_atlas_get_texture() const { } RID RasterizerStorageRD::decal_atlas_get_texture_srgb() const { - return decal_atlas.texture; + return decal_atlas.texture_srgb; } void RasterizerStorageRD::_update_decal_atlas() { diff --git a/servers/rendering/rasterizer_rd/shaders/canvas.glsl b/servers/rendering/rasterizer_rd/shaders/canvas.glsl index e33b3face9..4a40584e16 100644 --- a/servers/rendering/rasterizer_rd/shaders/canvas.glsl +++ b/servers/rendering/rasterizer_rd/shaders/canvas.glsl @@ -101,7 +101,7 @@ void main() { offset += 1; } else { instance_color = vec4(texelFetch(instancing_buffer, offset + 0), texelFetch(instancing_buffer, offset + 1), texelFetch(instancing_buffer, offset + 2), texelFetch(instancing_buffer, offset + 3)); - offser += 4; + offset += 4; } color *= instance_color; diff --git a/servers/rendering/rasterizer_rd/shaders/particles.glsl b/servers/rendering/rasterizer_rd/shaders/particles.glsl index 3de807b57c..a924509771 100644 --- a/servers/rendering/rasterizer_rd/shaders/particles.glsl +++ b/servers/rendering/rasterizer_rd/shaders/particles.glsl @@ -147,7 +147,7 @@ bool emit_particle(mat4 p_xform, vec3 p_velocity, vec4 p_color, vec4 p_custom, u while(attempts-- > 0) { dst_index = dst_particles.particle_count; if (dst_index == dst_particles.particle_max) { - return false; //cant emit anymore + return false; //can't emit anymore } if (atomicCompSwap(dst_particles.particle_count, dst_index, dst_index +1 ) != dst_index) { diff --git a/servers/rendering/rasterizer_rd/shaders/scene_high_end.glsl b/servers/rendering/rasterizer_rd/shaders/scene_high_end.glsl index 2a7b73d9aa..e11f3983c5 100644 --- a/servers/rendering/rasterizer_rd/shaders/scene_high_end.glsl +++ b/servers/rendering/rasterizer_rd/shaders/scene_high_end.glsl @@ -681,7 +681,7 @@ LIGHT_SHADER_CODE #ifndef USE_NO_SHADOWS -// Produces cheap white noise, optmized for window-space +// Produces cheap white noise, optimized for window-space // Comes from: https://www.shadertoy.com/view/4djSRW // Copyright: Dave Hoskins, MIT License float quick_hash(vec2 pos) { diff --git a/servers/rendering/rasterizer_rd/shaders/scene_high_end_inc.glsl b/servers/rendering/rasterizer_rd/shaders/scene_high_end_inc.glsl index 66bfefbe89..0cc2b90c53 100644 --- a/servers/rendering/rasterizer_rd/shaders/scene_high_end_inc.glsl +++ b/servers/rendering/rasterizer_rd/shaders/scene_high_end_inc.glsl @@ -252,7 +252,7 @@ layout(set = 1, binding = 0) uniform textureCube radiance_cubemap; #endif -/* Set 2, Reflection and Shadow Atlases (view dependant) */ +/* Set 2, Reflection and Shadow Atlases (view dependent) */ layout(set = 2, binding = 0) uniform textureCubeArray reflection_atlas; diff --git a/servers/rendering/rasterizer_rd/shaders/sdfgi_direct_light.glsl b/servers/rendering/rasterizer_rd/shaders/sdfgi_direct_light.glsl index c4b29216d5..61e4bf5e18 100644 --- a/servers/rendering/rasterizer_rd/shaders/sdfgi_direct_light.glsl +++ b/servers/rendering/rasterizer_rd/shaders/sdfgi_direct_light.glsl @@ -22,7 +22,7 @@ dispatch_data; struct ProcessVoxel { uint position; //xyz 7 bit packed, extra 11 bits for neigbours uint albedo; //rgb bits 0-15 albedo, bits 16-21 are normal bits (set if geometry exists toward that side), extra 11 bits for neibhbours - uint light; //rgbe8985 encoded total saved light, extra 2 bits for neighbous + uint light; //rgbe8985 encoded total saved light, extra 2 bits for neighbours uint light_aniso; //55555 light anisotropy, extra 2 bits for neighbours //total neighbours: 26 }; diff --git a/servers/rendering/rasterizer_rd/shaders/sdfgi_integrate.glsl b/servers/rendering/rasterizer_rd/shaders/sdfgi_integrate.glsl index 1ec471d204..d516ab22c3 100644 --- a/servers/rendering/rasterizer_rd/shaders/sdfgi_integrate.glsl +++ b/servers/rendering/rasterizer_rd/shaders/sdfgi_integrate.glsl @@ -336,7 +336,7 @@ void main() { #ifdef MODE_STORE - // converting to octahedral in this step is requiered because + // converting to octahedral in this step is required because // octahedral is much faster to read from the screen than spherical harmonics, // despite the very slight quality loss @@ -512,7 +512,7 @@ void main() { imageStore(lightprobe_average_scroll_texture, dst_pos, value); } } else if (params.cascade < params.max_cascades - 1) { - //cant scroll, must look for position in parent cascade + //can't scroll, must look for position in parent cascade //to global coords float probe_cell_size = float(params.grid_size.x / float(params.probe_axis_size - 1)) / cascades.data[params.cascade].to_cell; diff --git a/servers/rendering/rasterizer_rd/shaders/sdfgi_preprocess.glsl b/servers/rendering/rasterizer_rd/shaders/sdfgi_preprocess.glsl index dd0ca5c506..916c60ac89 100644 --- a/servers/rendering/rasterizer_rd/shaders/sdfgi_preprocess.glsl +++ b/servers/rendering/rasterizer_rd/shaders/sdfgi_preprocess.glsl @@ -103,7 +103,7 @@ dispatch_data; struct ProcessVoxel { uint position; //xyz 7 bit packed, extra 11 bits for neigbours uint albedo; //rgb bits 0-15 albedo, bits 16-21 are normal bits (set if geometry exists toward that side), extra 11 bits for neibhbours - uint light; //rgbe8985 encoded total saved light, extra 2 bits for neighbous + uint light; //rgbe8985 encoded total saved light, extra 2 bits for neighbours uint light_aniso; //55555 light anisotropy, extra 2 bits for neighbours //total neighbours: 26 }; @@ -136,7 +136,7 @@ dispatch_data; struct ProcessVoxel { uint position; //xyz 7 bit packed, extra 11 bits for neigbours uint albedo; //rgb bits 0-15 albedo, bits 16-21 are normal bits (set if geometry exists toward that side), extra 11 bits for neibhbours - uint light; //rgbe8985 encoded total saved light, extra 2 bits for neighbous + uint light; //rgbe8985 encoded total saved light, extra 2 bits for neighbours uint light_aniso; //55555 light anisotropy, extra 2 bits for neighbours //total neighbours: 26 }; @@ -274,7 +274,7 @@ void main() { #ifdef MODE_JUMPFLOOD - //regular jumpflood, efficent for large steps, inefficient for small steps + //regular jumpflood, efficient for large steps, inefficient for small steps ivec3 pos = ivec3(gl_GlobalInvocationID.xyz); vec3 posf = vec3(pos); diff --git a/servers/rendering/rasterizer_rd/shaders/volumetric_fog.glsl b/servers/rendering/rasterizer_rd/shaders/volumetric_fog.glsl index cb19fb0b69..13b162f0c9 100644 --- a/servers/rendering/rasterizer_rd/shaders/volumetric_fog.glsl +++ b/servers/rendering/rasterizer_rd/shaders/volumetric_fog.glsl @@ -485,7 +485,7 @@ void main() { //get depth at cell pos float z = get_depth_at_pos(fog_cell_size.z, i); - //get distance from previos pos + //get distance from previous pos float d = abs(prev_z - z); //compute exinction based on beer's float extinction = t * exp(-d * fog.a); diff --git a/servers/rendering/rendering_server_canvas.cpp b/servers/rendering/rendering_server_canvas.cpp index 07eabfd430..b3d5b0ad83 100644 --- a/servers/rendering/rendering_server_canvas.cpp +++ b/servers/rendering/rendering_server_canvas.cpp @@ -81,6 +81,7 @@ void _collect_ysort_children(RenderingServerCanvas::Item *p_canvas_item, Transfo child_items[i]->ysort_xform = p_transform; child_items[i]->ysort_pos = p_transform.xform(child_items[i]->xform.elements[2]); child_items[i]->material_owner = child_items[i]->use_parent_material ? p_material_owner : nullptr; + child_items[i]->ysort_index = r_index; } r_index++; diff --git a/servers/rendering/rendering_server_canvas.h b/servers/rendering/rendering_server_canvas.h index 59c0d1fa52..cebe32fba0 100644 --- a/servers/rendering/rendering_server_canvas.h +++ b/servers/rendering/rendering_server_canvas.h @@ -51,6 +51,7 @@ public: Color ysort_modulate; Transform2D ysort_xform; Vector2 ysort_pos; + int ysort_index; RS::CanvasItemTextureFilter texture_filter; RS::CanvasItemTextureRepeat texture_repeat; @@ -69,6 +70,7 @@ public: ysort_children_count = -1; ysort_xform = Transform2D(); ysort_pos = Vector2(); + ysort_index = 0; texture_filter = RS::CANVAS_ITEM_TEXTURE_FILTER_DEFAULT; texture_repeat = RS::CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT; } @@ -83,7 +85,7 @@ public: struct ItemPtrSort { _FORCE_INLINE_ bool operator()(const Item *p_left, const Item *p_right) const { if (Math::is_equal_approx(p_left->ysort_pos.y, p_right->ysort_pos.y)) { - return p_left->ysort_pos.x < p_right->ysort_pos.x; + return p_left->ysort_index < p_right->ysort_index; } return p_left->ysort_pos.y < p_right->ysort_pos.y; diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp index 28c41fb2dc..6c835fcadf 100644 --- a/servers/rendering/shader_language.cpp +++ b/servers/rendering/shader_language.cpp @@ -6099,6 +6099,14 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct case TK_UNIFORM: case TK_VARYING: { bool uniform = tk.type == TK_UNIFORM; + + if (!uniform) { + if (shader_type_identifier == "particles" || shader_type_identifier == "sky") { + _set_error(vformat("Varyings cannot be used in '%s' shaders!", shader_type_identifier)); + return ERR_PARSE_ERROR; + } + } + DataPrecision precision = PRECISION_DEFAULT; DataInterpolation interpolation = INTERPOLATION_SMOOTH; DataType type; diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 8f863a6fc8..9ad19e4b38 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -1505,9 +1505,14 @@ ShaderLanguage::DataType RenderingServer::global_variable_type_get_shader_dataty } } +RenderingDevice *RenderingServer::create_local_rendering_device() const { + return RenderingDevice::get_singleton()->create_local_device(); +} + void RenderingServer::_bind_methods() { ClassDB::bind_method(D_METHOD("force_sync"), &RenderingServer::sync); ClassDB::bind_method(D_METHOD("force_draw", "swap_buffers", "frame_step"), &RenderingServer::draw, DEFVAL(true), DEFVAL(0.0)); + ClassDB::bind_method(D_METHOD("create_local_rendering_device"), &RenderingServer::create_local_rendering_device); #ifndef _MSC_VER #warning TODO all texture methods need re-binding diff --git a/servers/rendering_server.h b/servers/rendering_server.h index 49f840948f..7dae45f126 100644 --- a/servers/rendering_server.h +++ b/servers/rendering_server.h @@ -39,6 +39,7 @@ #include "core/typed_array.h" #include "core/variant.h" #include "servers/display_server.h" +#include "servers/rendering/rendering_device.h" #include "servers/rendering/shader_language.h" class RenderingServer : public Object { @@ -1311,6 +1312,8 @@ public: virtual bool is_low_end() const = 0; + RenderingDevice *create_local_rendering_device() const; + bool is_render_loop_enabled() const; void set_render_loop_enabled(bool p_enabled); diff --git a/tests/test_expression.h b/tests/test_expression.h index 85d37d1460..a3d4877d52 100644 --- a/tests/test_expression.h +++ b/tests/test_expression.h @@ -66,7 +66,7 @@ TEST_CASE("[Expression] Integer arithmetic") { "Integer / integer division should parse successfully."); CHECK_MESSAGE( int(expression.execute()) == 2, - "Integer / integer divsion should return the expected result."); + "Integer / integer division should return the expected result."); CHECK_MESSAGE( expression.parse("2 * (6 + 14) / 2 - 5") == OK, @@ -98,21 +98,21 @@ TEST_CASE("[Expression] Floating-point arithmetic") { "Float / integer division should parse successfully."); CHECK_MESSAGE( Math::is_equal_approx(float(expression.execute()), 0.3), - "Float / integer divsion should return the expected result."); + "Float / integer division should return the expected result."); CHECK_MESSAGE( expression.parse("3 / 10.0") == OK, "Basic integer / float division should parse successfully."); CHECK_MESSAGE( Math::is_equal_approx(float(expression.execute()), 0.3), - "Basic integer / float divsion should return the expected result."); + "Basic integer / float division should return the expected result."); CHECK_MESSAGE( expression.parse("3.0 / 10.0") == OK, "Float / float division should parse successfully."); CHECK_MESSAGE( Math::is_equal_approx(float(expression.execute()), 0.3), - "Float / float divsion should return the expected result."); + "Float / float division should return the expected result."); CHECK_MESSAGE( expression.parse("2.5 * (6.0 + 14.25) / 2.0 - 5.12345") == OK, @@ -148,6 +148,20 @@ TEST_CASE("[Expression] Scientific notation") { "The expression should return the expected result."); } +TEST_CASE("[Expression] Underscored numeric literals") { + Expression expression; + + CHECK_MESSAGE( + expression.parse("1_000_000") == OK, + "The expression should parse successfully."); + CHECK_MESSAGE( + expression.parse("1_000.000") == OK, + "The expression should parse successfully."); + CHECK_MESSAGE( + expression.parse("0xff_99_00") == OK, + "The expression should parse successfully."); +} + TEST_CASE("[Expression] Built-in functions") { Expression expression; diff --git a/tests/test_list.h b/tests/test_list.h new file mode 100644 index 0000000000..7412fbc3c8 --- /dev/null +++ b/tests/test_list.h @@ -0,0 +1,279 @@ +/*************************************************************************/ +/* test_list.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#ifndef TEST_LIST_H +#define TEST_LIST_H + +#include "core/list.h" + +#include "tests/test_macros.h" + +namespace TestList { + +static void populate_integers(List<int> &p_list, List<int>::Element *r_elements[], int num_elements) { + p_list.clear(); + for (int i = 0; i < num_elements; ++i) { + List<int>::Element *n = p_list.push_back(i); + r_elements[i] = n; + } +} + +TEST_CASE("[List] Swap adjacent front and back") { + List<int> list; + List<int>::Element *n[2]; + populate_integers(list, n, 2); + + list.swap(list.front(), list.back()); + + CHECK(list.front()->prev() == nullptr); + CHECK(list.front() != list.front()->next()); + + CHECK(list.front() == n[1]); + CHECK(list.back() == n[0]); + + CHECK(list.back()->next() == nullptr); + CHECK(list.back() != list.back()->prev()); +} + +TEST_CASE("[List] Swap first adjacent pair") { + List<int> list; + List<int>::Element *n[4]; + populate_integers(list, n, 4); + + list.swap(n[0], n[1]); + + CHECK(list.front()->prev() == nullptr); + CHECK(list.front() != list.front()->next()); + + CHECK(list.front() == n[1]); + CHECK(list.front()->next() == n[0]); + CHECK(list.back()->prev() == n[2]); + CHECK(list.back() == n[3]); + + CHECK(list.back()->next() == nullptr); + CHECK(list.back() != list.back()->prev()); +} + +TEST_CASE("[List] Swap middle adjacent pair") { + List<int> list; + List<int>::Element *n[4]; + populate_integers(list, n, 4); + + list.swap(n[1], n[2]); + + CHECK(list.front()->prev() == nullptr); + + CHECK(list.front() == n[0]); + CHECK(list.front()->next() == n[2]); + CHECK(list.back()->prev() == n[1]); + CHECK(list.back() == n[3]); + + CHECK(list.back()->next() == nullptr); +} + +TEST_CASE("[List] Swap last adjacent pair") { + List<int> list; + List<int>::Element *n[4]; + populate_integers(list, n, 4); + + list.swap(n[2], n[3]); + + CHECK(list.front()->prev() == nullptr); + + CHECK(list.front() == n[0]); + CHECK(list.front()->next() == n[1]); + CHECK(list.back()->prev() == n[3]); + CHECK(list.back() == n[2]); + + CHECK(list.back()->next() == nullptr); +} + +TEST_CASE("[List] Swap first cross pair") { + List<int> list; + List<int>::Element *n[4]; + populate_integers(list, n, 4); + + list.swap(n[0], n[2]); + + CHECK(list.front()->prev() == nullptr); + + CHECK(list.front() == n[2]); + CHECK(list.front()->next() == n[1]); + CHECK(list.back()->prev() == n[0]); + CHECK(list.back() == n[3]); + + CHECK(list.back()->next() == nullptr); +} + +TEST_CASE("[List] Swap last cross pair") { + List<int> list; + List<int>::Element *n[4]; + populate_integers(list, n, 4); + + list.swap(n[1], n[3]); + + CHECK(list.front()->prev() == nullptr); + + CHECK(list.front() == n[0]); + CHECK(list.front()->next() == n[3]); + CHECK(list.back()->prev() == n[2]); + CHECK(list.back() == n[1]); + + CHECK(list.back()->next() == nullptr); +} + +TEST_CASE("[List] Swap edges") { + List<int> list; + List<int>::Element *n[4]; + populate_integers(list, n, 4); + + list.swap(n[1], n[3]); + + CHECK(list.front()->prev() == nullptr); + + CHECK(list.front() == n[0]); + CHECK(list.front()->next() == n[3]); + CHECK(list.back()->prev() == n[2]); + CHECK(list.back() == n[1]); + + CHECK(list.back()->next() == nullptr); +} + +TEST_CASE("[List] Swap middle (values check)") { + List<String> list; + List<String>::Element *n_str1 = list.push_back("Still"); + List<String>::Element *n_str2 = list.push_back("waiting"); + List<String>::Element *n_str3 = list.push_back("for"); + List<String>::Element *n_str4 = list.push_back("Godot."); + + CHECK(n_str1->get() == "Still"); + CHECK(n_str4->get() == "Godot."); + + CHECK(list.front()->get() == "Still"); + CHECK(list.front()->next()->get() == "waiting"); + CHECK(list.back()->prev()->get() == "for"); + CHECK(list.back()->get() == "Godot."); + + list.swap(n_str2, n_str3); + + CHECK(list.front()->next()->get() == "for"); + CHECK(list.back()->prev()->get() == "waiting"); +} + +TEST_CASE("[List] Swap front and back (values check)") { + List<Variant> list; + Variant str = "Godot"; + List<Variant>::Element *n_str = list.push_back(str); + Variant color = Color(0, 0, 1); + List<Variant>::Element *n_color = list.push_back(color); + + CHECK(list.front()->get() == "Godot"); + CHECK(list.back()->get() == Color(0, 0, 1)); + + list.swap(n_str, n_color); + + CHECK(list.front()->get() == Color(0, 0, 1)); + CHECK(list.back()->get() == "Godot"); +} + +TEST_CASE("[List] Swap adjacent back and front (reverse order of elements)") { + List<int> list; + List<int>::Element *n[2]; + populate_integers(list, n, 2); + + list.swap(n[1], n[0]); + + List<int>::Element *it = list.front(); + while (it) { + List<int>::Element *prev_it = it; + it = it->next(); + if (it == prev_it) { + FAIL_CHECK("Infinite loop detected."); + break; + } + } +} + +static void swap_random(List<int> &p_list, List<int>::Element *r_elements[], size_t p_size, size_t p_iterations) { + Math::seed(0); + + for (size_t test_i = 0; test_i < p_iterations; ++test_i) { + // A and B elements have corresponding indices as values. + const int a_idx = static_cast<int>(Math::rand() % p_size); + const int b_idx = static_cast<int>(Math::rand() % p_size); + List<int>::Element *a = p_list.find(a_idx); // via find. + List<int>::Element *b = r_elements[b_idx]; // via pointer. + + int va = a->get(); + int vb = b->get(); + + p_list.swap(a, b); + + CHECK(va == a->get()); + CHECK(vb == b->get()); + + size_t element_count = 0; + + // Fully traversable after swap? + List<int>::Element *it = p_list.front(); + while (it) { + element_count += 1; + List<int>::Element *prev_it = it; + it = it->next(); + if (it == prev_it) { + FAIL_CHECK("Infinite loop detected."); + break; + } + } + // We should not lose anything in the process. + if (element_count != p_size) { + FAIL_CHECK("Element count mismatch."); + break; + } + } +} + +TEST_CASE("[Stress][List] Swap random 100 elements, 500 iterations.") { + List<int> list; + List<int>::Element *n[100]; + populate_integers(list, n, 100); + swap_random(list, n, 100, 500); +} + +TEST_CASE("[Stress][List] Swap random 10 elements, 1000 iterations.") { + List<int> list; + List<int>::Element *n[10]; + populate_integers(list, n, 10); + swap_random(list, n, 10, 1000); +} + +} // namespace TestList + +#endif // TEST_LIST_H diff --git a/tests/test_main.cpp b/tests/test_main.cpp index 4e172caadb..f0dec22738 100644 --- a/tests/test_main.cpp +++ b/tests/test_main.cpp @@ -39,6 +39,7 @@ #include "test_expression.h" #include "test_gradient.h" #include "test_gui.h" +#include "test_list.h" #include "test_math.h" #include "test_oa_hash_map.h" #include "test_ordered_hash_map.h" diff --git a/thirdparty/README.md b/thirdparty/README.md index 58bdafa850..46a75d94b0 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -658,7 +658,7 @@ Files extracted from upstream source: ## zstd - Upstream: https://github.com/facebook/zstd -- Version: 1.4.4 (2019) +- Version: 1.4.5 (2020) - License: BSD-3-Clause Files extracted from upstream source: diff --git a/thirdparty/zstd/common/bitstream.h b/thirdparty/zstd/common/bitstream.h index 1c294b80d1..37b99c01ee 100644 --- a/thirdparty/zstd/common/bitstream.h +++ b/thirdparty/zstd/common/bitstream.h @@ -1,35 +1,15 @@ /* ****************************************************************** - bitstream - Part of FSE library - Copyright (C) 2013-present, Yann Collet. - - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + * bitstream + * Part of FSE library + * Copyright (c) 2013-2020, Yann Collet, Facebook, Inc. + * + * You can contact the author at : + * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. ****************************************************************** */ #ifndef BITSTREAM_H_MODULE #define BITSTREAM_H_MODULE @@ -48,6 +28,7 @@ extern "C" { * Dependencies ******************************************/ #include "mem.h" /* unaligned access routines */ +#include "compiler.h" /* UNLIKELY() */ #include "debug.h" /* assert(), DEBUGLOG(), RAWLOG() */ #include "error_private.h" /* error codes and messages */ @@ -161,8 +142,7 @@ MEM_STATIC unsigned BIT_highbit32 (U32 val) { # if defined(_MSC_VER) /* Visual */ unsigned long r=0; - _BitScanReverse ( &r, val ); - return (unsigned) r; + return _BitScanReverse ( &r, val ) ? (unsigned)r : 0; # elif defined(__GNUC__) && (__GNUC__ >= 3) /* Use GCC Intrinsic */ return __builtin_clz (val) ^ 31; # elif defined(__ICCARM__) /* IAR Intrinsic */ @@ -411,6 +391,23 @@ MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, unsigned nbBits) return value; } +/*! BIT_reloadDStreamFast() : + * Similar to BIT_reloadDStream(), but with two differences: + * 1. bitsConsumed <= sizeof(bitD->bitContainer)*8 must hold! + * 2. Returns BIT_DStream_overflow when bitD->ptr < bitD->limitPtr, at this + * point you must use BIT_reloadDStream() to reload. + */ +MEM_STATIC BIT_DStream_status BIT_reloadDStreamFast(BIT_DStream_t* bitD) +{ + if (UNLIKELY(bitD->ptr < bitD->limitPtr)) + return BIT_DStream_overflow; + assert(bitD->bitsConsumed <= sizeof(bitD->bitContainer)*8); + bitD->ptr -= bitD->bitsConsumed >> 3; + bitD->bitsConsumed &= 7; + bitD->bitContainer = MEM_readLEST(bitD->ptr); + return BIT_DStream_unfinished; +} + /*! BIT_reloadDStream() : * Refill `bitD` from buffer previously set in BIT_initDStream() . * This function is safe, it guarantees it will not read beyond src buffer. @@ -422,10 +419,7 @@ MEM_STATIC BIT_DStream_status BIT_reloadDStream(BIT_DStream_t* bitD) return BIT_DStream_overflow; if (bitD->ptr >= bitD->limitPtr) { - bitD->ptr -= bitD->bitsConsumed >> 3; - bitD->bitsConsumed &= 7; - bitD->bitContainer = MEM_readLEST(bitD->ptr); - return BIT_DStream_unfinished; + return BIT_reloadDStreamFast(bitD); } if (bitD->ptr == bitD->start) { if (bitD->bitsConsumed < sizeof(bitD->bitContainer)*8) return BIT_DStream_endOfBuffer; diff --git a/thirdparty/zstd/common/compiler.h b/thirdparty/zstd/common/compiler.h index 1877a0c1d9..95e9483521 100644 --- a/thirdparty/zstd/common/compiler.h +++ b/thirdparty/zstd/common/compiler.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -17,7 +17,7 @@ /* force inlining */ #if !defined(ZSTD_NO_INLINE) -#if defined (__GNUC__) || defined(__cplusplus) || defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ +#if (defined(__GNUC__) && !defined(__STRICT_ANSI__)) || defined(__cplusplus) || defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ # define INLINE_KEYWORD inline #else # define INLINE_KEYWORD @@ -114,6 +114,9 @@ # include <mmintrin.h> /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */ # define PREFETCH_L1(ptr) _mm_prefetch((const char*)(ptr), _MM_HINT_T0) # define PREFETCH_L2(ptr) _mm_prefetch((const char*)(ptr), _MM_HINT_T1) +# elif defined(__aarch64__) +# define PREFETCH_L1(ptr) __asm__ __volatile__("prfm pldl1keep, %0" ::"Q"(*(ptr))) +# define PREFETCH_L2(ptr) __asm__ __volatile__("prfm pldl2keep, %0" ::"Q"(*(ptr))) # elif defined(__GNUC__) && ( (__GNUC__ >= 4) || ( (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1) ) ) # define PREFETCH_L1(ptr) __builtin_prefetch((ptr), 0 /* rw==read */, 3 /* locality */) # define PREFETCH_L2(ptr) __builtin_prefetch((ptr), 0 /* rw==read */, 2 /* locality */) @@ -136,7 +139,7 @@ /* vectorization * older GCC (pre gcc-4.3 picked as the cutoff) uses a different syntax */ -#if !defined(__clang__) && defined(__GNUC__) +#if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ > 3) || (__GNUC__ >= 5) # define DONT_VECTORIZE __attribute__((optimize("no-tree-vectorize"))) # else @@ -146,6 +149,19 @@ # define DONT_VECTORIZE #endif +/* Tell the compiler that a branch is likely or unlikely. + * Only use these macros if it causes the compiler to generate better code. + * If you can remove a LIKELY/UNLIKELY annotation without speed changes in gcc + * and clang, please do. + */ +#if defined(__GNUC__) +#define LIKELY(x) (__builtin_expect((x), 1)) +#define UNLIKELY(x) (__builtin_expect((x), 0)) +#else +#define LIKELY(x) (x) +#define UNLIKELY(x) (x) +#endif + /* disable warnings */ #ifdef _MSC_VER /* Visual Studio */ # include <intrin.h> /* For Visual 2005 */ diff --git a/thirdparty/zstd/common/cpu.h b/thirdparty/zstd/common/cpu.h index 5f0923fc92..6e8a974f62 100644 --- a/thirdparty/zstd/common/cpu.h +++ b/thirdparty/zstd/common/cpu.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-present, Facebook, Inc. + * Copyright (c) 2018-2020, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the diff --git a/thirdparty/zstd/common/debug.c b/thirdparty/zstd/common/debug.c index 3ebdd1cb15..f303f4a2e5 100644 --- a/thirdparty/zstd/common/debug.c +++ b/thirdparty/zstd/common/debug.c @@ -1,35 +1,15 @@ /* ****************************************************************** - debug - Part of FSE library - Copyright (C) 2013-present, Yann Collet. - - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + * debug + * Part of FSE library + * Copyright (c) 2013-2020, Yann Collet, Facebook, Inc. + * + * You can contact the author at : + * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. ****************************************************************** */ diff --git a/thirdparty/zstd/common/debug.h b/thirdparty/zstd/common/debug.h index b4fc89d497..ac6224888d 100644 --- a/thirdparty/zstd/common/debug.h +++ b/thirdparty/zstd/common/debug.h @@ -1,35 +1,15 @@ /* ****************************************************************** - debug - Part of FSE library - Copyright (C) 2013-present, Yann Collet. - - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + * debug + * Part of FSE library + * Copyright (c) 2013-2020, Yann Collet, Facebook, Inc. + * + * You can contact the author at : + * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. ****************************************************************** */ diff --git a/thirdparty/zstd/common/entropy_common.c b/thirdparty/zstd/common/entropy_common.c index b12944e1de..9d3e4e8e36 100644 --- a/thirdparty/zstd/common/entropy_common.c +++ b/thirdparty/zstd/common/entropy_common.c @@ -1,36 +1,16 @@ -/* - Common functions of New Generation Entropy library - Copyright (C) 2016, Yann Collet. - - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - FSE+HUF source repository : https://github.com/Cyan4973/FiniteStateEntropy - - Public forum : https://groups.google.com/forum/#!forum/lz4c -*************************************************************************** */ +/* ****************************************************************** + * Common functions of New Generation Entropy library + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. + * + * You can contact the author at : + * - FSE+HUF source repository : https://github.com/Cyan4973/FiniteStateEntropy + * - Public forum : https://groups.google.com/forum/#!forum/lz4c + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. +****************************************************************** */ /* ************************************* * Dependencies diff --git a/thirdparty/zstd/common/error_private.c b/thirdparty/zstd/common/error_private.c index 7c1bb67a23..cd437529c1 100644 --- a/thirdparty/zstd/common/error_private.c +++ b/thirdparty/zstd/common/error_private.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -47,6 +47,7 @@ const char* ERR_getErrorString(ERR_enum code) /* following error codes are not stable and may be removed or changed in a future version */ case PREFIX(frameIndex_tooLarge): return "Frame index is too large"; case PREFIX(seekableIO): return "An I/O error occurred when reading/seeking"; + case PREFIX(dstBuffer_wrong): return "Destination buffer is wrong"; case PREFIX(maxCode): default: return notErrorCode; } diff --git a/thirdparty/zstd/common/error_private.h b/thirdparty/zstd/common/error_private.h index 0d2fa7e34b..982cf8e9fe 100644 --- a/thirdparty/zstd/common/error_private.h +++ b/thirdparty/zstd/common/error_private.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -49,7 +49,7 @@ typedef ZSTD_ErrorCode ERR_enum; /*-**************************************** * Error codes handling ******************************************/ -#undef ERROR /* reported already defined on VS 2015 (Rich Geldreich) */ +#undef ERROR /* already defined on Visual Studio */ #define ERROR(name) ZSTD_ERROR(name) #define ZSTD_ERROR(name) ((size_t)-PREFIX(name)) @@ -57,6 +57,10 @@ ERR_STATIC unsigned ERR_isError(size_t code) { return (code > ERROR(maxCode)); } ERR_STATIC ERR_enum ERR_getErrorCode(size_t code) { if (!ERR_isError(code)) return (ERR_enum)0; return (ERR_enum) (0-code); } +/* check and forward error code */ +#define CHECK_V_F(e, f) size_t const e = f; if (ERR_isError(e)) return e +#define CHECK_F(f) { CHECK_V_F(_var_err__, f); } + /*-**************************************** * Error Strings diff --git a/thirdparty/zstd/common/fse.h b/thirdparty/zstd/common/fse.h index a7553e3721..ff54e70ea7 100644 --- a/thirdparty/zstd/common/fse.h +++ b/thirdparty/zstd/common/fse.h @@ -1,35 +1,15 @@ /* ****************************************************************** - FSE : Finite State Entropy codec - Public Prototypes declaration - Copyright (C) 2013-2016, Yann Collet. - - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + * FSE : Finite State Entropy codec + * Public Prototypes declaration + * Copyright (c) 2013-2020, Yann Collet, Facebook, Inc. + * + * You can contact the author at : + * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. ****************************************************************** */ #if defined (__cplusplus) diff --git a/thirdparty/zstd/common/fse_decompress.c b/thirdparty/zstd/common/fse_decompress.c index 4f07378982..bcc2223ccc 100644 --- a/thirdparty/zstd/common/fse_decompress.c +++ b/thirdparty/zstd/common/fse_decompress.c @@ -1,35 +1,15 @@ /* ****************************************************************** - FSE : Finite State Entropy decoder - Copyright (C) 2013-2015, Yann Collet. - - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy - - Public forum : https://groups.google.com/forum/#!forum/lz4c + * FSE : Finite State Entropy decoder + * Copyright (c) 2013-2020, Yann Collet, Facebook, Inc. + * + * You can contact the author at : + * - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy + * - Public forum : https://groups.google.com/forum/#!forum/lz4c + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. ****************************************************************** */ @@ -51,11 +31,6 @@ #define FSE_isError ERR_isError #define FSE_STATIC_ASSERT(c) DEBUG_STATIC_ASSERT(c) /* use only *after* variable declarations */ -/* check and forward error code */ -#ifndef CHECK_F -#define CHECK_F(f) { size_t const e = f; if (FSE_isError(e)) return e; } -#endif - /* ************************************************************** * Templates @@ -287,7 +262,7 @@ size_t FSE_decompress_wksp(void* dst, size_t dstCapacity, const void* cSrc, size /* normal FSE decoding mode */ size_t const NCountLength = FSE_readNCount (counting, &maxSymbolValue, &tableLog, istart, cSrcSize); if (FSE_isError(NCountLength)) return NCountLength; - //if (NCountLength >= cSrcSize) return ERROR(srcSize_wrong); /* too small input size; supposed to be already checked in NCountLength, only remaining case : NCountLength==cSrcSize */ + /* if (NCountLength >= cSrcSize) return ERROR(srcSize_wrong); */ /* too small input size; supposed to be already checked in NCountLength, only remaining case : NCountLength==cSrcSize */ if (tableLog > maxLog) return ERROR(tableLog_tooLarge); ip += NCountLength; cSrcSize -= NCountLength; diff --git a/thirdparty/zstd/common/huf.h b/thirdparty/zstd/common/huf.h index 6b572c448d..ef432685da 100644 --- a/thirdparty/zstd/common/huf.h +++ b/thirdparty/zstd/common/huf.h @@ -1,35 +1,15 @@ /* ****************************************************************** - huff0 huffman codec, - part of Finite State Entropy library - Copyright (C) 2013-present, Yann Collet. - - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + * huff0 huffman codec, + * part of Finite State Entropy library + * Copyright (c) 2013-2020, Yann Collet, Facebook, Inc. + * + * You can contact the author at : + * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. ****************************************************************** */ #if defined (__cplusplus) @@ -110,7 +90,7 @@ HUF_PUBLIC_API size_t HUF_compress2 (void* dst, size_t dstCapacity, /** HUF_compress4X_wksp() : * Same as HUF_compress2(), but uses externally allocated `workSpace`. * `workspace` must have minimum alignment of 4, and be at least as large as HUF_WORKSPACE_SIZE */ -#define HUF_WORKSPACE_SIZE (6 << 10) +#define HUF_WORKSPACE_SIZE ((6 << 10) + 256) #define HUF_WORKSPACE_SIZE_U32 (HUF_WORKSPACE_SIZE / sizeof(U32)) HUF_PUBLIC_API size_t HUF_compress4X_wksp (void* dst, size_t dstCapacity, const void* src, size_t srcSize, @@ -208,6 +188,8 @@ typedef struct HUF_CElt_s HUF_CElt; /* incomplete type */ size_t HUF_buildCTable (HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue, unsigned maxNbBits); /* @return : maxNbBits; CTable and count can overlap. In which case, CTable will overwrite count content */ size_t HUF_writeCTable (void* dst, size_t maxDstSize, const HUF_CElt* CTable, unsigned maxSymbolValue, unsigned huffLog); size_t HUF_compress4X_usingCTable(void* dst, size_t dstSize, const void* src, size_t srcSize, const HUF_CElt* CTable); +size_t HUF_estimateCompressedSize(const HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue); +int HUF_validateCTable(const HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue); typedef enum { HUF_repeat_none, /**< Cannot use the previous table */ @@ -246,7 +228,7 @@ size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, /** HUF_readCTable() : * Loading a CTable saved with HUF_writeCTable() */ -size_t HUF_readCTable (HUF_CElt* CTable, unsigned* maxSymbolValuePtr, const void* src, size_t srcSize); +size_t HUF_readCTable (HUF_CElt* CTable, unsigned* maxSymbolValuePtr, const void* src, size_t srcSize, unsigned *hasZeroWeights); /** HUF_getNbBits() : * Read nbBits from CTable symbolTable, for symbol `symbolValue` presumed <= HUF_SYMBOLVALUE_MAX diff --git a/thirdparty/zstd/common/mem.h b/thirdparty/zstd/common/mem.h index 530d30c8f7..89c8aea7d2 100644 --- a/thirdparty/zstd/common/mem.h +++ b/thirdparty/zstd/common/mem.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the diff --git a/thirdparty/zstd/common/pool.c b/thirdparty/zstd/common/pool.c index f575935076..aa4b4de0d3 100644 --- a/thirdparty/zstd/common/pool.c +++ b/thirdparty/zstd/common/pool.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the diff --git a/thirdparty/zstd/common/pool.h b/thirdparty/zstd/common/pool.h index 458d37f13c..259bafc975 100644 --- a/thirdparty/zstd/common/pool.h +++ b/thirdparty/zstd/common/pool.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -18,7 +18,7 @@ extern "C" { #include <stddef.h> /* size_t */ #define ZSTD_STATIC_LINKING_ONLY /* ZSTD_customMem */ -#include "zstd.h" +#include "../zstd.h" typedef struct POOL_ctx_s POOL_ctx; diff --git a/thirdparty/zstd/common/threading.c b/thirdparty/zstd/common/threading.c index 482664bd9a..e2edb313eb 100644 --- a/thirdparty/zstd/common/threading.c +++ b/thirdparty/zstd/common/threading.c @@ -2,12 +2,13 @@ * Copyright (c) 2016 Tino Reichardt * All rights reserved. * + * You can contact the author at: + * - zstdmt source repository: https://github.com/mcmilk/zstdmt + * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). - * - * You can contact the author at: - * - zstdmt source repository: https://github.com/mcmilk/zstdmt + * You may select, at your option, one of the above-listed licenses. */ /** diff --git a/thirdparty/zstd/common/threading.h b/thirdparty/zstd/common/threading.h index 3193ca7db8..fd0060d5aa 100644 --- a/thirdparty/zstd/common/threading.h +++ b/thirdparty/zstd/common/threading.h @@ -2,12 +2,13 @@ * Copyright (c) 2016 Tino Reichardt * All rights reserved. * + * You can contact the author at: + * - zstdmt source repository: https://github.com/mcmilk/zstdmt + * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). - * - * You can contact the author at: - * - zstdmt source repository: https://github.com/mcmilk/zstdmt + * You may select, at your option, one of the above-listed licenses. */ #ifndef THREADING_H_938743 diff --git a/thirdparty/zstd/common/xxhash.c b/thirdparty/zstd/common/xxhash.c index 99d2459621..597de18fc8 100644 --- a/thirdparty/zstd/common/xxhash.c +++ b/thirdparty/zstd/common/xxhash.c @@ -1,35 +1,15 @@ /* -* xxHash - Fast Hash algorithm -* Copyright (C) 2012-2016, Yann Collet -* -* BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are -* met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above -* copyright notice, this list of conditions and the following disclaimer -* in the documentation and/or other materials provided with the -* distribution. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* You can contact the author at : -* - xxHash homepage: http://www.xxhash.com -* - xxHash source repository : https://github.com/Cyan4973/xxHash + * xxHash - Fast Hash algorithm + * Copyright (c) 2012-2020, Yann Collet, Facebook, Inc. + * + * You can contact the author at : + * - xxHash homepage: http://www.xxhash.com + * - xxHash source repository : https://github.com/Cyan4973/xxHash + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. */ @@ -115,7 +95,7 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size) { return memcp /* ************************************* * Compiler Specific Options ***************************************/ -#if defined (__GNUC__) || defined(__cplusplus) || defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ +#if (defined(__GNUC__) && !defined(__STRICT_ANSI__)) || defined(__cplusplus) || defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ # define INLINE_KEYWORD inline #else # define INLINE_KEYWORD @@ -729,7 +709,9 @@ FORCE_INLINE_TEMPLATE XXH_errorcode XXH64_update_endian (XXH64_state_t* state, c state->total_len += len; if (state->memsize + len < 32) { /* fill in tmp buffer */ - XXH_memcpy(((BYTE*)state->mem64) + state->memsize, input, len); + if (input != NULL) { + XXH_memcpy(((BYTE*)state->mem64) + state->memsize, input, len); + } state->memsize += (U32)len; return XXH_OK; } diff --git a/thirdparty/zstd/common/xxhash.h b/thirdparty/zstd/common/xxhash.h index 9bad1f59f6..4207eba832 100644 --- a/thirdparty/zstd/common/xxhash.h +++ b/thirdparty/zstd/common/xxhash.h @@ -1,35 +1,15 @@ /* - xxHash - Extremely Fast Hash algorithm - Header File - Copyright (C) 2012-2016, Yann Collet. - - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - xxHash source repository : https://github.com/Cyan4973/xxHash + * xxHash - Extremely Fast Hash algorithm + * Header File + * Copyright (c) 2012-2020, Yann Collet, Facebook, Inc. + * + * You can contact the author at : + * - xxHash source repository : https://github.com/Cyan4973/xxHash + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. */ /* Notice extracted from xxHash homepage : diff --git a/thirdparty/zstd/common/zstd_common.c b/thirdparty/zstd/common/zstd_common.c index 667f4a27fc..91fe3323a5 100644 --- a/thirdparty/zstd/common/zstd_common.c +++ b/thirdparty/zstd/common/zstd_common.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the diff --git a/thirdparty/zstd/common/zstd_errors.h b/thirdparty/zstd/common/zstd_errors.h index 92a3433896..998398e7e5 100644 --- a/thirdparty/zstd/common/zstd_errors.h +++ b/thirdparty/zstd/common/zstd_errors.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -76,6 +76,7 @@ typedef enum { /* following error codes are __NOT STABLE__, they can be removed or changed in future versions */ ZSTD_error_frameIndex_tooLarge = 100, ZSTD_error_seekableIO = 102, + ZSTD_error_dstBuffer_wrong = 104, ZSTD_error_maxCode = 120 /* never EVER use this value directly, it can change in future versions! Use ZSTD_isError() instead */ } ZSTD_ErrorCode; diff --git a/thirdparty/zstd/common/zstd_internal.h b/thirdparty/zstd/common/zstd_internal.h index dcdcbdb81c..3bc7e55a0a 100644 --- a/thirdparty/zstd/common/zstd_internal.h +++ b/thirdparty/zstd/common/zstd_internal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -19,12 +19,15 @@ /*-************************************* * Dependencies ***************************************/ +#ifdef __aarch64__ +#include <arm_neon.h> +#endif #include "compiler.h" #include "mem.h" #include "debug.h" /* assert, DEBUGLOG, RAWLOG, g_debuglevel */ #include "error_private.h" #define ZSTD_STATIC_LINKING_ONLY -#include "zstd.h" +#include "../zstd.h" #define FSE_STATIC_LINKING_ONLY #include "fse.h" #define HUF_STATIC_LINKING_ONLY @@ -54,6 +57,31 @@ extern "C" { #define MAX(a,b) ((a)>(b) ? (a) : (b)) /** + * Ignore: this is an internal helper. + * + * This is a helper function to help force C99-correctness during compilation. + * Under strict compilation modes, variadic macro arguments can't be empty. + * However, variadic function arguments can be. Using a function therefore lets + * us statically check that at least one (string) argument was passed, + * independent of the compilation flags. + */ +static INLINE_KEYWORD UNUSED_ATTR +void _force_has_format_string(const char *format, ...) { + (void)format; +} + +/** + * Ignore: this is an internal helper. + * + * We want to force this function invocation to be syntactically correct, but + * we don't want to force runtime evaluation of its arguments. + */ +#define _FORCE_HAS_FORMAT_STRING(...) \ + if (0) { \ + _force_has_format_string(__VA_ARGS__); \ + } + +/** * Return the specified error if the condition evaluates to true. * * In debug modes, prints additional information. @@ -62,7 +90,9 @@ extern "C" { */ #define RETURN_ERROR_IF(cond, err, ...) \ if (cond) { \ - RAWLOG(3, "%s:%d: ERROR!: check %s failed, returning %s", __FILE__, __LINE__, ZSTD_QUOTE(cond), ZSTD_QUOTE(ERROR(err))); \ + RAWLOG(3, "%s:%d: ERROR!: check %s failed, returning %s", \ + __FILE__, __LINE__, ZSTD_QUOTE(cond), ZSTD_QUOTE(ERROR(err))); \ + _FORCE_HAS_FORMAT_STRING(__VA_ARGS__); \ RAWLOG(3, ": " __VA_ARGS__); \ RAWLOG(3, "\n"); \ return ERROR(err); \ @@ -75,7 +105,9 @@ extern "C" { */ #define RETURN_ERROR(err, ...) \ do { \ - RAWLOG(3, "%s:%d: ERROR!: unconditional check failed, returning %s", __FILE__, __LINE__, ZSTD_QUOTE(ERROR(err))); \ + RAWLOG(3, "%s:%d: ERROR!: unconditional check failed, returning %s", \ + __FILE__, __LINE__, ZSTD_QUOTE(ERROR(err))); \ + _FORCE_HAS_FORMAT_STRING(__VA_ARGS__); \ RAWLOG(3, ": " __VA_ARGS__); \ RAWLOG(3, "\n"); \ return ERROR(err); \ @@ -90,7 +122,9 @@ extern "C" { do { \ size_t const err_code = (err); \ if (ERR_isError(err_code)) { \ - RAWLOG(3, "%s:%d: ERROR!: forwarding error in %s: %s", __FILE__, __LINE__, ZSTD_QUOTE(err), ERR_getErrorName(err_code)); \ + RAWLOG(3, "%s:%d: ERROR!: forwarding error in %s: %s", \ + __FILE__, __LINE__, ZSTD_QUOTE(err), ERR_getErrorName(err_code)); \ + _FORCE_HAS_FORMAT_STRING(__VA_ARGS__); \ RAWLOG(3, ": " __VA_ARGS__); \ RAWLOG(3, "\n"); \ return err_code; \ @@ -128,6 +162,8 @@ static const size_t ZSTD_did_fieldSize[4] = { 0, 1, 2, 4 }; static const size_t ZSTD_blockHeaderSize = ZSTD_BLOCKHEADERSIZE; typedef enum { bt_raw, bt_rle, bt_compressed, bt_reserved } blockType_e; +#define ZSTD_FRAMECHECKSUMSIZE 4 + #define MIN_SEQUENCES_SIZE 1 /* nbSeq==0 */ #define MIN_CBLOCK_SIZE (1 /*litCSize*/ + 1 /* RLE or RAW */ + MIN_SEQUENCES_SIZE /* nbSeq==0 */) /* for a non-null block */ @@ -191,10 +227,22 @@ static const U32 OF_defaultNormLog = OF_DEFAULTNORMLOG; /*-******************************************* * Shared functions to include for inlining *********************************************/ -static void ZSTD_copy8(void* dst, const void* src) { memcpy(dst, src, 8); } +static void ZSTD_copy8(void* dst, const void* src) { +#ifdef __aarch64__ + vst1_u8((uint8_t*)dst, vld1_u8((const uint8_t*)src)); +#else + memcpy(dst, src, 8); +#endif +} #define COPY8(d,s) { ZSTD_copy8(d,s); d+=8; s+=8; } -static void ZSTD_copy16(void* dst, const void* src) { memcpy(dst, src, 16); } +static void ZSTD_copy16(void* dst, const void* src) { +#ifdef __aarch64__ + vst1q_u8((uint8_t*)dst, vld1q_u8((const uint8_t*)src)); +#else + memcpy(dst, src, 16); +#endif +} #define COPY16(d,s) { ZSTD_copy16(d,s); d+=16; s+=16; } #define WILDCOPY_OVERLENGTH 32 @@ -213,7 +261,7 @@ typedef enum { * - ZSTD_overlap_src_before_dst: The src and dst may overlap, but they MUST be at least 8 bytes apart. * The src buffer must be before the dst buffer. */ -MEM_STATIC FORCE_INLINE_ATTR DONT_VECTORIZE +MEM_STATIC FORCE_INLINE_ATTR void ZSTD_wildcopy(void* dst, const void* src, ptrdiff_t length, ZSTD_overlap_e const ovtype) { ptrdiff_t diff = (BYTE*)dst - (const BYTE*)src; @@ -230,13 +278,18 @@ void ZSTD_wildcopy(void* dst, const void* src, ptrdiff_t length, ZSTD_overlap_e } while (op < oend); } else { assert(diff >= WILDCOPY_VECLEN || diff <= -WILDCOPY_VECLEN); - /* Separate out the first two COPY16() calls because the copy length is + /* Separate out the first COPY16() call because the copy length is * almost certain to be short, so the branches have different - * probabilities. - * On gcc-9 unrolling once is +1.6%, twice is +2%, thrice is +1.8%. - * On clang-8 unrolling once is +1.4%, twice is +3.3%, thrice is +3%. + * probabilities. Since it is almost certain to be short, only do + * one COPY16() in the first call. Then, do two calls per loop since + * at that point it is more likely to have a high trip count. */ - COPY16(op, ip); +#ifndef __aarch64__ + do { + COPY16(op, ip); + } + while (op < oend); +#else COPY16(op, ip); if (op >= oend) return; do { @@ -244,9 +297,29 @@ void ZSTD_wildcopy(void* dst, const void* src, ptrdiff_t length, ZSTD_overlap_e COPY16(op, ip); } while (op < oend); +#endif + } +} + +MEM_STATIC size_t ZSTD_limitCopy(void* dst, size_t dstCapacity, const void* src, size_t srcSize) +{ + size_t const length = MIN(dstCapacity, srcSize); + if (length > 0) { + memcpy(dst, src, length); } + return length; } +/* define "workspace is too large" as this number of times larger than needed */ +#define ZSTD_WORKSPACETOOLARGE_FACTOR 3 + +/* when workspace is continuously too large + * during at least this number of times, + * context's memory usage is considered wasteful, + * because it's sized to handle a worst case scenario which rarely happens. + * In which case, resize it down to free some memory */ +#define ZSTD_WORKSPACETOOLARGE_MAXDURATION 128 + /*-******************************************* * Private declarations @@ -271,6 +344,31 @@ typedef struct { U32 longLengthPos; } seqStore_t; +typedef struct { + U32 litLength; + U32 matchLength; +} ZSTD_sequenceLength; + +/** + * Returns the ZSTD_sequenceLength for the given sequences. It handles the decoding of long sequences + * indicated by longLengthPos and longLengthID, and adds MINMATCH back to matchLength. + */ +MEM_STATIC ZSTD_sequenceLength ZSTD_getSequenceLength(seqStore_t const* seqStore, seqDef const* seq) +{ + ZSTD_sequenceLength seqLen; + seqLen.litLength = seq->litLength; + seqLen.matchLength = seq->matchLength + MINMATCH; + if (seqStore->longLengthPos == (U32)(seq - seqStore->sequencesStart)) { + if (seqStore->longLengthID == 1) { + seqLen.litLength += 0xFFFF; + } + if (seqStore->longLengthID == 2) { + seqLen.matchLength += 0xFFFF; + } + } + return seqLen; +} + /** * Contains the compressed frame size and an upper-bound for the decompressed frame size. * Note: before using `compressedSize`, check for errors using ZSTD_isError(). @@ -297,8 +395,7 @@ MEM_STATIC U32 ZSTD_highbit32(U32 val) /* compress, dictBuilder, decodeCorpus { # if defined(_MSC_VER) /* Visual */ unsigned long r=0; - _BitScanReverse(&r, val); - return (unsigned)r; + return _BitScanReverse(&r, val) ? (unsigned)r : 0; # elif defined(__GNUC__) && (__GNUC__ >= 3) /* GCC Intrinsic */ return __builtin_clz (val) ^ 31; # elif defined(__ICCARM__) /* IAR Intrinsic */ diff --git a/thirdparty/zstd/compress/fse_compress.c b/thirdparty/zstd/compress/fse_compress.c index 68b47e1093..a42759814f 100644 --- a/thirdparty/zstd/compress/fse_compress.c +++ b/thirdparty/zstd/compress/fse_compress.c @@ -1,35 +1,15 @@ /* ****************************************************************** - FSE : Finite State Entropy encoder - Copyright (C) 2013-present, Yann Collet. - - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy - - Public forum : https://groups.google.com/forum/#!forum/lz4c + * FSE : Finite State Entropy encoder + * Copyright (c) 2013-2020, Yann Collet, Facebook, Inc. + * + * You can contact the author at : + * - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy + * - Public forum : https://groups.google.com/forum/#!forum/lz4c + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. ****************************************************************** */ /* ************************************************************** @@ -37,14 +17,14 @@ ****************************************************************/ #include <stdlib.h> /* malloc, free, qsort */ #include <string.h> /* memcpy, memset */ -#include "compiler.h" -#include "mem.h" /* U32, U16, etc. */ -#include "debug.h" /* assert, DEBUGLOG */ +#include "../common/compiler.h" +#include "../common/mem.h" /* U32, U16, etc. */ +#include "../common/debug.h" /* assert, DEBUGLOG */ #include "hist.h" /* HIST_count_wksp */ -#include "bitstream.h" +#include "../common/bitstream.h" #define FSE_STATIC_LINKING_ONLY -#include "fse.h" -#include "error_private.h" +#include "../common/fse.h" +#include "../common/error_private.h" /* ************************************************************** @@ -645,9 +625,6 @@ size_t FSE_compress_usingCTable (void* dst, size_t dstSize, size_t FSE_compressBound(size_t size) { return FSE_COMPRESSBOUND(size); } -#define CHECK_V_F(e, f) size_t const e = f; if (ERR_isError(e)) return e -#define CHECK_F(f) { CHECK_V_F(_var_err__, f); } - /* FSE_compress_wksp() : * Same as FSE_compress2(), but using an externally allocated scratch buffer (`workSpace`). * `wkspSize` size must be `(1<<tableLog)`. diff --git a/thirdparty/zstd/compress/hist.c b/thirdparty/zstd/compress/hist.c index 45b7babc1e..61e08c7968 100644 --- a/thirdparty/zstd/compress/hist.c +++ b/thirdparty/zstd/compress/hist.c @@ -1,42 +1,22 @@ /* ****************************************************************** - hist : Histogram functions - part of Finite State Entropy project - Copyright (C) 2013-present, Yann Collet. - - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy - - Public forum : https://groups.google.com/forum/#!forum/lz4c + * hist : Histogram functions + * part of Finite State Entropy project + * Copyright (c) 2013-2020, Yann Collet, Facebook, Inc. + * + * You can contact the author at : + * - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy + * - Public forum : https://groups.google.com/forum/#!forum/lz4c + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. ****************************************************************** */ /* --- dependencies --- */ -#include "mem.h" /* U32, BYTE, etc. */ -#include "debug.h" /* assert, DEBUGLOG */ -#include "error_private.h" /* ERROR */ +#include "../common/mem.h" /* U32, BYTE, etc. */ +#include "../common/debug.h" /* assert, DEBUGLOG */ +#include "../common/error_private.h" /* ERROR */ #include "hist.h" diff --git a/thirdparty/zstd/compress/hist.h b/thirdparty/zstd/compress/hist.h index 8b389358dc..77e3ec4fb1 100644 --- a/thirdparty/zstd/compress/hist.h +++ b/thirdparty/zstd/compress/hist.h @@ -1,36 +1,16 @@ /* ****************************************************************** - hist : Histogram functions - part of Finite State Entropy project - Copyright (C) 2013-present, Yann Collet. - - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy - - Public forum : https://groups.google.com/forum/#!forum/lz4c + * hist : Histogram functions + * part of Finite State Entropy project + * Copyright (c) 2013-2020, Yann Collet, Facebook, Inc. + * + * You can contact the author at : + * - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy + * - Public forum : https://groups.google.com/forum/#!forum/lz4c + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. ****************************************************************** */ /* --- dependencies --- */ diff --git a/thirdparty/zstd/compress/huf_compress.c b/thirdparty/zstd/compress/huf_compress.c index f074f1e0a9..546879868a 100644 --- a/thirdparty/zstd/compress/huf_compress.c +++ b/thirdparty/zstd/compress/huf_compress.c @@ -1,35 +1,15 @@ /* ****************************************************************** - Huffman encoder, part of New Generation Entropy library - Copyright (C) 2013-2016, Yann Collet. - - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - FSE+HUF source repository : https://github.com/Cyan4973/FiniteStateEntropy - - Public forum : https://groups.google.com/forum/#!forum/lz4c + * Huffman encoder, part of New Generation Entropy library + * Copyright (c) 2013-2020, Yann Collet, Facebook, Inc. + * + * You can contact the author at : + * - FSE+HUF source repository : https://github.com/Cyan4973/FiniteStateEntropy + * - Public forum : https://groups.google.com/forum/#!forum/lz4c + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. ****************************************************************** */ /* ************************************************************** @@ -45,14 +25,14 @@ ****************************************************************/ #include <string.h> /* memcpy, memset */ #include <stdio.h> /* printf (debug) */ -#include "compiler.h" -#include "bitstream.h" +#include "../common/compiler.h" +#include "../common/bitstream.h" #include "hist.h" #define FSE_STATIC_LINKING_ONLY /* FSE_optimalTableLog_internal */ -#include "fse.h" /* header compression */ +#include "../common/fse.h" /* header compression */ #define HUF_STATIC_LINKING_ONLY -#include "huf.h" -#include "error_private.h" +#include "../common/huf.h" +#include "../common/error_private.h" /* ************************************************************** @@ -60,8 +40,6 @@ ****************************************************************/ #define HUF_isError ERR_isError #define HUF_STATIC_ASSERT(c) DEBUG_STATIC_ASSERT(c) /* use only *after* variable declarations */ -#define CHECK_V_F(e, f) size_t const e = f; if (ERR_isError(e)) return e -#define CHECK_F(f) { CHECK_V_F(_var_err__, f); } /* ************************************************************** @@ -110,18 +88,18 @@ static size_t HUF_compressWeights (void* dst, size_t dstSize, const void* weight CHECK_F( FSE_normalizeCount(norm, tableLog, count, wtSize, maxSymbolValue) ); /* Write table description header */ - { CHECK_V_F(hSize, FSE_writeNCount(op, oend-op, norm, maxSymbolValue, tableLog) ); + { CHECK_V_F(hSize, FSE_writeNCount(op, (size_t)(oend-op), norm, maxSymbolValue, tableLog) ); op += hSize; } /* Compress */ CHECK_F( FSE_buildCTable_wksp(CTable, norm, maxSymbolValue, tableLog, scratchBuffer, sizeof(scratchBuffer)) ); - { CHECK_V_F(cSize, FSE_compress_usingCTable(op, oend - op, weightTable, wtSize, CTable) ); + { CHECK_V_F(cSize, FSE_compress_usingCTable(op, (size_t)(oend - op), weightTable, wtSize, CTable) ); if (cSize == 0) return 0; /* not enough space for compressed data */ op += cSize; } - return op-ostart; + return (size_t)(op-ostart); } @@ -169,7 +147,7 @@ size_t HUF_writeCTable (void* dst, size_t maxDstSize, } -size_t HUF_readCTable (HUF_CElt* CTable, unsigned* maxSymbolValuePtr, const void* src, size_t srcSize) +size_t HUF_readCTable (HUF_CElt* CTable, unsigned* maxSymbolValuePtr, const void* src, size_t srcSize, unsigned* hasZeroWeights) { BYTE huffWeight[HUF_SYMBOLVALUE_MAX + 1]; /* init not required, even though some static analyzer may complain */ U32 rankVal[HUF_TABLELOG_ABSOLUTEMAX + 1]; /* large enough for values from 0 to 16 */ @@ -192,9 +170,11 @@ size_t HUF_readCTable (HUF_CElt* CTable, unsigned* maxSymbolValuePtr, const void } } /* fill nbBits */ + *hasZeroWeights = 0; { U32 n; for (n=0; n<nbSymbols; n++) { const U32 w = huffWeight[n]; - CTable[n].nbBits = (BYTE)(tableLog + 1 - w); + *hasZeroWeights |= (w == 0); + CTable[n].nbBits = (BYTE)(tableLog + 1 - w) & -(w != 0); } } /* fill val */ @@ -240,7 +220,7 @@ static U32 HUF_setMaxHeight(nodeElt* huffNode, U32 lastNonNull, U32 maxNbBits) /* there are several too large elements (at least >= 2) */ { int totalCost = 0; const U32 baseCost = 1 << (largestBits - maxNbBits); - U32 n = lastNonNull; + int n = (int)lastNonNull; while (huffNode[n].nbBits > maxNbBits) { totalCost += baseCost - (1 << (largestBits - huffNode[n].nbBits)); @@ -255,22 +235,22 @@ static U32 HUF_setMaxHeight(nodeElt* huffNode, U32 lastNonNull, U32 maxNbBits) /* repay normalized cost */ { U32 const noSymbol = 0xF0F0F0F0; U32 rankLast[HUF_TABLELOG_MAX+2]; - int pos; /* Get pos of last (smallest) symbol per rank */ memset(rankLast, 0xF0, sizeof(rankLast)); { U32 currentNbBits = maxNbBits; + int pos; for (pos=n ; pos >= 0; pos--) { if (huffNode[pos].nbBits >= currentNbBits) continue; currentNbBits = huffNode[pos].nbBits; /* < maxNbBits */ - rankLast[maxNbBits-currentNbBits] = pos; + rankLast[maxNbBits-currentNbBits] = (U32)pos; } } while (totalCost > 0) { - U32 nBitsToDecrease = BIT_highbit32(totalCost) + 1; + U32 nBitsToDecrease = BIT_highbit32((U32)totalCost) + 1; for ( ; nBitsToDecrease > 1; nBitsToDecrease--) { - U32 highPos = rankLast[nBitsToDecrease]; - U32 lowPos = rankLast[nBitsToDecrease-1]; + U32 const highPos = rankLast[nBitsToDecrease]; + U32 const lowPos = rankLast[nBitsToDecrease-1]; if (highPos == noSymbol) continue; if (lowPos == noSymbol) break; { U32 const highTotal = huffNode[highPos].count; @@ -297,7 +277,8 @@ static U32 HUF_setMaxHeight(nodeElt* huffNode, U32 lastNonNull, U32 maxNbBits) if (rankLast[1] == noSymbol) { /* special case : no rank 1 symbol (using maxNbBits-1); let's create one from largest rank 0 (using maxNbBits) */ while (huffNode[n].nbBits == maxNbBits) n--; huffNode[n+1].nbBits--; - rankLast[1] = n+1; + assert(n >= 0); + rankLast[1] = (U32)(n+1); totalCost++; continue; } @@ -309,29 +290,36 @@ static U32 HUF_setMaxHeight(nodeElt* huffNode, U32 lastNonNull, U32 maxNbBits) return maxNbBits; } - typedef struct { U32 base; U32 current; } rankPos; -static void HUF_sort(nodeElt* huffNode, const unsigned* count, U32 maxSymbolValue) +typedef nodeElt huffNodeTable[HUF_CTABLE_WORKSPACE_SIZE_U32]; + +#define RANK_POSITION_TABLE_SIZE 32 + +typedef struct { + huffNodeTable huffNodeTbl; + rankPos rankPosition[RANK_POSITION_TABLE_SIZE]; +} HUF_buildCTable_wksp_tables; + +static void HUF_sort(nodeElt* huffNode, const unsigned* count, U32 maxSymbolValue, rankPos* rankPosition) { - rankPos rank[32]; U32 n; - memset(rank, 0, sizeof(rank)); + memset(rankPosition, 0, sizeof(*rankPosition) * RANK_POSITION_TABLE_SIZE); for (n=0; n<=maxSymbolValue; n++) { U32 r = BIT_highbit32(count[n] + 1); - rank[r].base ++; + rankPosition[r].base ++; } - for (n=30; n>0; n--) rank[n-1].base += rank[n].base; - for (n=0; n<32; n++) rank[n].current = rank[n].base; + for (n=30; n>0; n--) rankPosition[n-1].base += rankPosition[n].base; + for (n=0; n<32; n++) rankPosition[n].current = rankPosition[n].base; for (n=0; n<=maxSymbolValue; n++) { U32 const c = count[n]; U32 const r = BIT_highbit32(c+1) + 1; - U32 pos = rank[r].current++; - while ((pos > rank[r].base) && (c > huffNode[pos-1].count)) { + U32 pos = rankPosition[r].current++; + while ((pos > rankPosition[r].base) && (c > huffNode[pos-1].count)) { huffNode[pos] = huffNode[pos-1]; pos--; } @@ -343,45 +331,48 @@ static void HUF_sort(nodeElt* huffNode, const unsigned* count, U32 maxSymbolValu /** HUF_buildCTable_wksp() : * Same as HUF_buildCTable(), but using externally allocated scratch buffer. - * `workSpace` must be aligned on 4-bytes boundaries, and be at least as large as a table of HUF_CTABLE_WORKSPACE_SIZE_U32 unsigned. + * `workSpace` must be aligned on 4-bytes boundaries, and be at least as large as sizeof(HUF_buildCTable_wksp_tables). */ #define STARTNODE (HUF_SYMBOLVALUE_MAX+1) -typedef nodeElt huffNodeTable[HUF_CTABLE_WORKSPACE_SIZE_U32]; + size_t HUF_buildCTable_wksp (HUF_CElt* tree, const unsigned* count, U32 maxSymbolValue, U32 maxNbBits, void* workSpace, size_t wkspSize) { - nodeElt* const huffNode0 = (nodeElt*)workSpace; + HUF_buildCTable_wksp_tables* const wksp_tables = (HUF_buildCTable_wksp_tables*)workSpace; + nodeElt* const huffNode0 = wksp_tables->huffNodeTbl; nodeElt* const huffNode = huffNode0+1; - U32 n, nonNullRank; + int nonNullRank; int lowS, lowN; - U16 nodeNb = STARTNODE; - U32 nodeRoot; + int nodeNb = STARTNODE; + int n, nodeRoot; /* safety checks */ if (((size_t)workSpace & 3) != 0) return ERROR(GENERIC); /* must be aligned on 4-bytes boundaries */ - if (wkspSize < sizeof(huffNodeTable)) return ERROR(workSpace_tooSmall); + if (wkspSize < sizeof(HUF_buildCTable_wksp_tables)) + return ERROR(workSpace_tooSmall); if (maxNbBits == 0) maxNbBits = HUF_TABLELOG_DEFAULT; - if (maxSymbolValue > HUF_SYMBOLVALUE_MAX) return ERROR(maxSymbolValue_tooLarge); + if (maxSymbolValue > HUF_SYMBOLVALUE_MAX) + return ERROR(maxSymbolValue_tooLarge); memset(huffNode0, 0, sizeof(huffNodeTable)); /* sort, decreasing order */ - HUF_sort(huffNode, count, maxSymbolValue); + HUF_sort(huffNode, count, maxSymbolValue, wksp_tables->rankPosition); /* init for parents */ - nonNullRank = maxSymbolValue; + nonNullRank = (int)maxSymbolValue; while(huffNode[nonNullRank].count == 0) nonNullRank--; lowS = nonNullRank; nodeRoot = nodeNb + lowS - 1; lowN = nodeNb; huffNode[nodeNb].count = huffNode[lowS].count + huffNode[lowS-1].count; - huffNode[lowS].parent = huffNode[lowS-1].parent = nodeNb; + huffNode[lowS].parent = huffNode[lowS-1].parent = (U16)nodeNb; nodeNb++; lowS-=2; for (n=nodeNb; n<=nodeRoot; n++) huffNode[n].count = (U32)(1U<<30); huffNode0[0].count = (U32)(1U<<31); /* fake entry, strong barrier */ /* create parents */ while (nodeNb <= nodeRoot) { - U32 n1 = (huffNode[lowS].count < huffNode[lowN].count) ? lowS-- : lowN++; - U32 n2 = (huffNode[lowS].count < huffNode[lowN].count) ? lowS-- : lowN++; + int const n1 = (huffNode[lowS].count < huffNode[lowN].count) ? lowS-- : lowN++; + int const n2 = (huffNode[lowS].count < huffNode[lowN].count) ? lowS-- : lowN++; huffNode[nodeNb].count = huffNode[n1].count + huffNode[n2].count; - huffNode[n1].parent = huffNode[n2].parent = nodeNb; + huffNode[n1].parent = huffNode[n2].parent = (U16)nodeNb; nodeNb++; } @@ -393,24 +384,25 @@ size_t HUF_buildCTable_wksp (HUF_CElt* tree, const unsigned* count, U32 maxSymbo huffNode[n].nbBits = huffNode[ huffNode[n].parent ].nbBits + 1; /* enforce maxTableLog */ - maxNbBits = HUF_setMaxHeight(huffNode, nonNullRank, maxNbBits); + maxNbBits = HUF_setMaxHeight(huffNode, (U32)nonNullRank, maxNbBits); /* fill result into tree (val, nbBits) */ { U16 nbPerRank[HUF_TABLELOG_MAX+1] = {0}; U16 valPerRank[HUF_TABLELOG_MAX+1] = {0}; + int const alphabetSize = (int)(maxSymbolValue + 1); if (maxNbBits > HUF_TABLELOG_MAX) return ERROR(GENERIC); /* check fit into table */ for (n=0; n<=nonNullRank; n++) nbPerRank[huffNode[n].nbBits]++; /* determine stating value per rank */ { U16 min = 0; - for (n=maxNbBits; n>0; n--) { + for (n=(int)maxNbBits; n>0; n--) { valPerRank[n] = min; /* get starting value within each rank */ min += nbPerRank[n]; min >>= 1; } } - for (n=0; n<=maxSymbolValue; n++) + for (n=0; n<alphabetSize; n++) tree[huffNode[n].byte].nbBits = huffNode[n].nbBits; /* push nbBits per symbol, symbol order */ - for (n=0; n<=maxSymbolValue; n++) + for (n=0; n<alphabetSize; n++) tree[n].val = valPerRank[tree[n].nbBits]++; /* assign value within rank, symbol order */ } @@ -423,11 +415,11 @@ size_t HUF_buildCTable_wksp (HUF_CElt* tree, const unsigned* count, U32 maxSymbo */ size_t HUF_buildCTable (HUF_CElt* tree, const unsigned* count, unsigned maxSymbolValue, unsigned maxNbBits) { - huffNodeTable nodeTable; - return HUF_buildCTable_wksp(tree, count, maxSymbolValue, maxNbBits, nodeTable, sizeof(nodeTable)); + HUF_buildCTable_wksp_tables workspace; + return HUF_buildCTable_wksp(tree, count, maxSymbolValue, maxNbBits, &workspace, sizeof(workspace)); } -static size_t HUF_estimateCompressedSize(HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue) +size_t HUF_estimateCompressedSize(const HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue) { size_t nbBits = 0; int s; @@ -437,7 +429,7 @@ static size_t HUF_estimateCompressedSize(HUF_CElt* CTable, const unsigned* count return nbBits >> 3; } -static int HUF_validateCTable(const HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue) { +int HUF_validateCTable(const HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue) { int bad = 0; int s; for (s = 0; s <= (int)maxSymbolValue; ++s) { @@ -476,7 +468,7 @@ HUF_compress1X_usingCTable_internal_body(void* dst, size_t dstSize, /* init */ if (dstSize < 8) return 0; /* not enough space to compress */ - { size_t const initErr = BIT_initCStream(&bitC, op, oend-op); + { size_t const initErr = BIT_initCStream(&bitC, op, (size_t)(oend-op)); if (HUF_isError(initErr)) return 0; } n = srcSize & ~3; /* join to mod 4 */ @@ -573,7 +565,8 @@ HUF_compress4X_usingCTable_internal(void* dst, size_t dstSize, if (srcSize < 12) return 0; /* no saving possible : too small input */ op += 6; /* jumpTable */ - { CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, oend-op, ip, segmentSize, CTable, bmi2) ); + assert(op <= oend); + { CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, segmentSize, CTable, bmi2) ); if (cSize==0) return 0; assert(cSize <= 65535); MEM_writeLE16(ostart, (U16)cSize); @@ -581,7 +574,8 @@ HUF_compress4X_usingCTable_internal(void* dst, size_t dstSize, } ip += segmentSize; - { CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, oend-op, ip, segmentSize, CTable, bmi2) ); + assert(op <= oend); + { CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, segmentSize, CTable, bmi2) ); if (cSize==0) return 0; assert(cSize <= 65535); MEM_writeLE16(ostart+2, (U16)cSize); @@ -589,7 +583,8 @@ HUF_compress4X_usingCTable_internal(void* dst, size_t dstSize, } ip += segmentSize; - { CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, oend-op, ip, segmentSize, CTable, bmi2) ); + assert(op <= oend); + { CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, segmentSize, CTable, bmi2) ); if (cSize==0) return 0; assert(cSize <= 65535); MEM_writeLE16(ostart+4, (U16)cSize); @@ -597,12 +592,14 @@ HUF_compress4X_usingCTable_internal(void* dst, size_t dstSize, } ip += segmentSize; - { CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, oend-op, ip, iend-ip, CTable, bmi2) ); + assert(op <= oend); + assert(ip <= iend); + { CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, (size_t)(iend-ip), CTable, bmi2) ); if (cSize==0) return 0; op += cSize; } - return op-ostart; + return (size_t)(op-ostart); } size_t HUF_compress4X_usingCTable(void* dst, size_t dstSize, const void* src, size_t srcSize, const HUF_CElt* CTable) @@ -618,20 +615,21 @@ static size_t HUF_compressCTable_internal( HUF_nbStreams_e nbStreams, const HUF_CElt* CTable, const int bmi2) { size_t const cSize = (nbStreams==HUF_singleStream) ? - HUF_compress1X_usingCTable_internal(op, oend - op, src, srcSize, CTable, bmi2) : - HUF_compress4X_usingCTable_internal(op, oend - op, src, srcSize, CTable, bmi2); + HUF_compress1X_usingCTable_internal(op, (size_t)(oend - op), src, srcSize, CTable, bmi2) : + HUF_compress4X_usingCTable_internal(op, (size_t)(oend - op), src, srcSize, CTable, bmi2); if (HUF_isError(cSize)) { return cSize; } if (cSize==0) { return 0; } /* uncompressible */ op += cSize; /* check compressibility */ + assert(op >= ostart); if ((size_t)(op-ostart) >= srcSize-1) { return 0; } - return op-ostart; + return (size_t)(op-ostart); } typedef struct { unsigned count[HUF_SYMBOLVALUE_MAX + 1]; HUF_CElt CTable[HUF_SYMBOLVALUE_MAX + 1]; - huffNodeTable nodeTable; + HUF_buildCTable_wksp_tables buildCTable_wksp; } HUF_compress_tables_t; /* HUF_compress_internal() : @@ -650,6 +648,8 @@ HUF_compress_internal (void* dst, size_t dstSize, BYTE* const oend = ostart + dstSize; BYTE* op = ostart; + HUF_STATIC_ASSERT(sizeof(*table) <= HUF_WORKSPACE_SIZE); + /* checks & inits */ if (((size_t)workSpace & 3) != 0) return ERROR(GENERIC); /* must be aligned on 4-bytes boundaries */ if (wkspSize < HUF_WORKSPACE_SIZE) return ERROR(workSpace_tooSmall); @@ -691,7 +691,7 @@ HUF_compress_internal (void* dst, size_t dstSize, huffLog = HUF_optimalTableLog(huffLog, srcSize, maxSymbolValue); { size_t const maxBits = HUF_buildCTable_wksp(table->CTable, table->count, maxSymbolValue, huffLog, - table->nodeTable, sizeof(table->nodeTable)); + &table->buildCTable_wksp, sizeof(table->buildCTable_wksp)); CHECK_F(maxBits); huffLog = (U32)maxBits; /* Zero unused symbols in CTable, so we can check it for validity */ diff --git a/thirdparty/zstd/compress/zstd_compress.c b/thirdparty/zstd/compress/zstd_compress.c index 35346b92cb..3f963b1cff 100644 --- a/thirdparty/zstd/compress/zstd_compress.c +++ b/thirdparty/zstd/compress/zstd_compress.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -13,13 +13,13 @@ ***************************************/ #include <limits.h> /* INT_MAX */ #include <string.h> /* memset */ -#include "cpu.h" -#include "mem.h" +#include "../common/cpu.h" +#include "../common/mem.h" #include "hist.h" /* HIST_countFast_wksp */ #define FSE_STATIC_LINKING_ONLY /* FSE_encodeSymbol */ -#include "fse.h" +#include "../common/fse.h" #define HUF_STATIC_LINKING_ONLY -#include "huf.h" +#include "../common/huf.h" #include "zstd_compress_internal.h" #include "zstd_compress_sequences.h" #include "zstd_compress_literals.h" @@ -28,11 +28,19 @@ #include "zstd_lazy.h" #include "zstd_opt.h" #include "zstd_ldm.h" +#include "zstd_compress_superblock.h" /*-************************************* * Helper functions ***************************************/ +/* ZSTD_compressBound() + * Note that the result from this function is only compatible with the "normal" + * full-block strategy. + * When there are a lot of small blocks due to frequent flush in streaming mode + * the overhead of headers can make the compressed data to be larger than the + * return value of ZSTD_compressBound(). + */ size_t ZSTD_compressBound(size_t srcSize) { return ZSTD_COMPRESSBOUND(srcSize); } @@ -82,7 +90,7 @@ ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem) } } -ZSTD_CCtx* ZSTD_initStaticCCtx(void *workspace, size_t workspaceSize) +ZSTD_CCtx* ZSTD_initStaticCCtx(void* workspace, size_t workspaceSize) { ZSTD_cwksp ws; ZSTD_CCtx* cctx; @@ -91,9 +99,8 @@ ZSTD_CCtx* ZSTD_initStaticCCtx(void *workspace, size_t workspaceSize) ZSTD_cwksp_init(&ws, workspace, workspaceSize); cctx = (ZSTD_CCtx*)ZSTD_cwksp_reserve_object(&ws, sizeof(ZSTD_CCtx)); - if (cctx == NULL) { - return NULL; - } + if (cctx == NULL) return NULL; + memset(cctx, 0, sizeof(ZSTD_CCtx)); ZSTD_cwksp_move(&cctx->workspace, &ws); cctx->staticSize = workspaceSize; @@ -102,8 +109,7 @@ ZSTD_CCtx* ZSTD_initStaticCCtx(void *workspace, size_t workspaceSize) if (!ZSTD_cwksp_check_available(&cctx->workspace, HUF_WORKSPACE_SIZE + 2 * sizeof(ZSTD_compressedBlockState_t))) return NULL; cctx->blockState.prevCBlock = (ZSTD_compressedBlockState_t*)ZSTD_cwksp_reserve_object(&cctx->workspace, sizeof(ZSTD_compressedBlockState_t)); cctx->blockState.nextCBlock = (ZSTD_compressedBlockState_t*)ZSTD_cwksp_reserve_object(&cctx->workspace, sizeof(ZSTD_compressedBlockState_t)); - cctx->entropyWorkspace = (U32*)ZSTD_cwksp_reserve_object( - &cctx->workspace, HUF_WORKSPACE_SIZE); + cctx->entropyWorkspace = (U32*)ZSTD_cwksp_reserve_object(&cctx->workspace, HUF_WORKSPACE_SIZE); cctx->bmi2 = ZSTD_cpuid_bmi2(ZSTD_cpuid()); return cctx; } @@ -227,7 +233,7 @@ size_t ZSTD_CCtxParams_reset(ZSTD_CCtx_params* params) } size_t ZSTD_CCtxParams_init(ZSTD_CCtx_params* cctxParams, int compressionLevel) { - RETURN_ERROR_IF(!cctxParams, GENERIC); + RETURN_ERROR_IF(!cctxParams, GENERIC, "NULL pointer!"); memset(cctxParams, 0, sizeof(*cctxParams)); cctxParams->compressionLevel = compressionLevel; cctxParams->fParams.contentSizeFlag = 1; @@ -236,8 +242,8 @@ size_t ZSTD_CCtxParams_init(ZSTD_CCtx_params* cctxParams, int compressionLevel) size_t ZSTD_CCtxParams_init_advanced(ZSTD_CCtx_params* cctxParams, ZSTD_parameters params) { - RETURN_ERROR_IF(!cctxParams, GENERIC); - FORWARD_IF_ERROR( ZSTD_checkCParams(params.cParams) ); + RETURN_ERROR_IF(!cctxParams, GENERIC, "NULL pointer!"); + FORWARD_IF_ERROR( ZSTD_checkCParams(params.cParams) , ""); memset(cctxParams, 0, sizeof(*cctxParams)); assert(!ZSTD_checkCParams(params.cParams)); cctxParams->cParams = params.cParams; @@ -249,12 +255,12 @@ size_t ZSTD_CCtxParams_init_advanced(ZSTD_CCtx_params* cctxParams, ZSTD_paramete /* ZSTD_assignParamsToCCtxParams() : * params is presumed valid at this stage */ static ZSTD_CCtx_params ZSTD_assignParamsToCCtxParams( - const ZSTD_CCtx_params* cctxParams, ZSTD_parameters params) + const ZSTD_CCtx_params* cctxParams, const ZSTD_parameters* params) { ZSTD_CCtx_params ret = *cctxParams; - assert(!ZSTD_checkCParams(params.cParams)); - ret.cParams = params.cParams; - ret.fParams = params.fParams; + assert(!ZSTD_checkCParams(params->cParams)); + ret.cParams = params->cParams; + ret.fParams = params->fParams; ret.compressionLevel = ZSTD_CLEVEL_DEFAULT; /* should not matter, as all cParams are presumed properly defined */ return ret; } @@ -339,8 +345,13 @@ ZSTD_bounds ZSTD_cParam_getBounds(ZSTD_cParameter param) return bounds; case ZSTD_c_overlapLog: +#ifdef ZSTD_MULTITHREAD bounds.lowerBound = ZSTD_OVERLAPLOG_MIN; bounds.upperBound = ZSTD_OVERLAPLOG_MAX; +#else + bounds.lowerBound = 0; + bounds.upperBound = 0; +#endif return bounds; case ZSTD_c_enableLongDistanceMatching: @@ -408,9 +419,8 @@ ZSTD_bounds ZSTD_cParam_getBounds(ZSTD_cParameter param) return bounds; default: - { ZSTD_bounds const boundError = { ERROR(parameter_unsupported), 0, 0 }; - return boundError; - } + bounds.error = ERROR(parameter_unsupported); + return bounds; } } @@ -428,7 +438,7 @@ static size_t ZSTD_cParam_clampBounds(ZSTD_cParameter cParam, int* value) #define BOUNDCHECK(cParam, val) { \ RETURN_ERROR_IF(!ZSTD_cParam_withinBounds(cParam,val), \ - parameter_outOfBound); \ + parameter_outOfBound, "Param out of bounds"); \ } @@ -476,7 +486,7 @@ size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, int value) if (ZSTD_isUpdateAuthorized(param)) { cctx->cParamsChanged = 1; } else { - RETURN_ERROR(stage_wrong); + RETURN_ERROR(stage_wrong, "can only set params in ctx init stage"); } } switch(param) @@ -513,7 +523,7 @@ size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, int value) case ZSTD_c_srcSizeHint: break; - default: RETURN_ERROR(parameter_unsupported); + default: RETURN_ERROR(parameter_unsupported, "unknown parameter"); } return ZSTD_CCtxParams_setParameter(&cctx->requestedParams, param, value); } @@ -530,7 +540,7 @@ size_t ZSTD_CCtxParams_setParameter(ZSTD_CCtx_params* CCtxParams, return (size_t)CCtxParams->format; case ZSTD_c_compressionLevel : { - FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(param, &value)); + FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(param, &value), ""); if (value) { /* 0 : does not change current level */ CCtxParams->compressionLevel = value; } @@ -618,7 +628,7 @@ size_t ZSTD_CCtxParams_setParameter(ZSTD_CCtx_params* CCtxParams, RETURN_ERROR_IF(value!=0, parameter_unsupported, "not compiled with multithreading"); return 0; #else - FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(param, &value)); + FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(param, &value), ""); CCtxParams->nbWorkers = value; return CCtxParams->nbWorkers; #endif @@ -631,7 +641,7 @@ size_t ZSTD_CCtxParams_setParameter(ZSTD_CCtx_params* CCtxParams, /* Adjust to the minimum non-default value. */ if (value != 0 && value < ZSTDMT_JOBSIZE_MIN) value = ZSTDMT_JOBSIZE_MIN; - FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(param, &value)); + FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(param, &value), ""); assert(value >= 0); CCtxParams->jobSize = value; return CCtxParams->jobSize; @@ -642,7 +652,7 @@ size_t ZSTD_CCtxParams_setParameter(ZSTD_CCtx_params* CCtxParams, RETURN_ERROR_IF(value!=0, parameter_unsupported, "not compiled with multithreading"); return 0; #else - FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(ZSTD_c_overlapLog, &value)); + FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(ZSTD_c_overlapLog, &value), ""); CCtxParams->overlapLog = value; return CCtxParams->overlapLog; #endif @@ -652,7 +662,7 @@ size_t ZSTD_CCtxParams_setParameter(ZSTD_CCtx_params* CCtxParams, RETURN_ERROR_IF(value!=0, parameter_unsupported, "not compiled with multithreading"); return 0; #else - FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(ZSTD_c_overlapLog, &value)); + FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(ZSTD_c_overlapLog, &value), ""); CCtxParams->rsyncable = value; return CCtxParams->rsyncable; #endif @@ -681,7 +691,7 @@ size_t ZSTD_CCtxParams_setParameter(ZSTD_CCtx_params* CCtxParams, case ZSTD_c_ldmHashRateLog : RETURN_ERROR_IF(value > ZSTD_WINDOWLOG_MAX - ZSTD_HASHLOG_MIN, - parameter_outOfBound); + parameter_outOfBound, "Param out of bounds!"); CCtxParams->ldmParams.hashRateLog = value; return CCtxParams->ldmParams.hashRateLog; @@ -821,8 +831,11 @@ size_t ZSTD_CCtx_setParametersUsingCCtxParams( ZSTD_CCtx* cctx, const ZSTD_CCtx_params* params) { DEBUGLOG(4, "ZSTD_CCtx_setParametersUsingCCtxParams"); - RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong); - RETURN_ERROR_IF(cctx->cdict, stage_wrong); + RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, + "The context is in the wrong stage!"); + RETURN_ERROR_IF(cctx->cdict, stage_wrong, + "Can't override parameters with cdict attached (some must " + "be inherited from the cdict)."); cctx->requestedParams = *params; return 0; @@ -831,7 +844,8 @@ size_t ZSTD_CCtx_setParametersUsingCCtxParams( ZSTDLIB_API size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx* cctx, unsigned long long pledgedSrcSize) { DEBUGLOG(4, "ZSTD_CCtx_setPledgedSrcSize to %u bytes", (U32)pledgedSrcSize); - RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong); + RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, + "Can't set pledgedSrcSize when not in init stage."); cctx->pledgedSrcSizePlusOne = pledgedSrcSize+1; return 0; } @@ -845,7 +859,7 @@ static size_t ZSTD_initLocalDict(ZSTD_CCtx* cctx) { ZSTD_localDict* const dl = &cctx->localDict; ZSTD_compressionParameters const cParams = ZSTD_getCParamsFromCCtxParams( - &cctx->requestedParams, 0, dl->dictSize); + &cctx->requestedParams, ZSTD_CONTENTSIZE_UNKNOWN, dl->dictSize); if (dl->dict == NULL) { /* No local dictionary. */ assert(dl->dictBuffer == NULL); @@ -869,7 +883,7 @@ static size_t ZSTD_initLocalDict(ZSTD_CCtx* cctx) dl->dictContentType, cParams, cctx->customMem); - RETURN_ERROR_IF(!dl->cdict, memory_allocation); + RETURN_ERROR_IF(!dl->cdict, memory_allocation, "ZSTD_createCDict_advanced failed"); cctx->cdict = dl->cdict; return 0; } @@ -878,7 +892,8 @@ size_t ZSTD_CCtx_loadDictionary_advanced( ZSTD_CCtx* cctx, const void* dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType) { - RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong); + RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, + "Can't load a dictionary when ctx is not in init stage."); RETURN_ERROR_IF(cctx->staticSize, memory_allocation, "no malloc for static CCtx"); DEBUGLOG(4, "ZSTD_CCtx_loadDictionary_advanced (size: %u)", (U32)dictSize); @@ -889,7 +904,7 @@ size_t ZSTD_CCtx_loadDictionary_advanced( cctx->localDict.dict = dict; } else { void* dictBuffer = ZSTD_malloc(dictSize, cctx->customMem); - RETURN_ERROR_IF(!dictBuffer, memory_allocation); + RETURN_ERROR_IF(!dictBuffer, memory_allocation, "NULL pointer!"); memcpy(dictBuffer, dict, dictSize); cctx->localDict.dictBuffer = dictBuffer; cctx->localDict.dict = dictBuffer; @@ -915,7 +930,8 @@ ZSTDLIB_API size_t ZSTD_CCtx_loadDictionary(ZSTD_CCtx* cctx, const void* dict, s size_t ZSTD_CCtx_refCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict) { - RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong); + RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, + "Can't ref a dict when ctx not in init stage."); /* Free the existing local cdict (if any) to save memory. */ ZSTD_clearAllDicts(cctx); cctx->cdict = cdict; @@ -930,11 +946,14 @@ size_t ZSTD_CCtx_refPrefix(ZSTD_CCtx* cctx, const void* prefix, size_t prefixSiz size_t ZSTD_CCtx_refPrefix_advanced( ZSTD_CCtx* cctx, const void* prefix, size_t prefixSize, ZSTD_dictContentType_e dictContentType) { - RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong); + RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, + "Can't ref a prefix when ctx not in init stage."); ZSTD_clearAllDicts(cctx); - cctx->prefixDict.dict = prefix; - cctx->prefixDict.dictSize = prefixSize; - cctx->prefixDict.dictContentType = dictContentType; + if (prefix != NULL && prefixSize > 0) { + cctx->prefixDict.dict = prefix; + cctx->prefixDict.dictSize = prefixSize; + cctx->prefixDict.dictContentType = dictContentType; + } return 0; } @@ -949,7 +968,8 @@ size_t ZSTD_CCtx_reset(ZSTD_CCtx* cctx, ZSTD_ResetDirective reset) } if ( (reset == ZSTD_reset_parameters) || (reset == ZSTD_reset_session_and_parameters) ) { - RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong); + RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, + "Can't reset parameters only when not in init stage."); ZSTD_clearAllDicts(cctx); return ZSTD_CCtxParams_reset(&cctx->requestedParams); } @@ -996,7 +1016,7 @@ ZSTD_clampCParams(ZSTD_compressionParameters cParams) /** ZSTD_cycleLog() : * condition for correct operation : hashLog > 1 */ -static U32 ZSTD_cycleLog(U32 hashLog, ZSTD_strategy strat) +U32 ZSTD_cycleLog(U32 hashLog, ZSTD_strategy strat) { U32 const btScale = ((U32)strat >= (U32)ZSTD_btlazy2); return hashLog - btScale; @@ -1006,7 +1026,7 @@ static U32 ZSTD_cycleLog(U32 hashLog, ZSTD_strategy strat) * optimize `cPar` for a specified input (`srcSize` and `dictSize`). * mostly downsize to reduce memory consumption and initialization latency. * `srcSize` can be ZSTD_CONTENTSIZE_UNKNOWN when not known. - * note : for the time being, `srcSize==0` means "unknown" too, for compatibility with older convention. + * note : `srcSize==0` means 0! * condition : cPar is presumed validated (can be checked using ZSTD_checkCParams()). */ static ZSTD_compressionParameters ZSTD_adjustCParams_internal(ZSTD_compressionParameters cPar, @@ -1017,10 +1037,8 @@ ZSTD_adjustCParams_internal(ZSTD_compressionParameters cPar, static const U64 maxWindowResize = 1ULL << (ZSTD_WINDOWLOG_MAX-1); assert(ZSTD_checkCParams(cPar)==0); - if (dictSize && (srcSize+1<2) /* ZSTD_CONTENTSIZE_UNKNOWN and 0 mean "unknown" */ ) - srcSize = minSrcSize; /* presumed small when there is a dictionary */ - else if (srcSize == 0) - srcSize = ZSTD_CONTENTSIZE_UNKNOWN; /* 0 == unknown : presumed large */ + if (dictSize && srcSize == ZSTD_CONTENTSIZE_UNKNOWN) + srcSize = minSrcSize; /* resize windowLog if input is small enough, to use less memory */ if ( (srcSize < maxWindowResize) @@ -1049,9 +1067,13 @@ ZSTD_adjustCParams(ZSTD_compressionParameters cPar, size_t dictSize) { cPar = ZSTD_clampCParams(cPar); /* resulting cPar is necessarily valid (all parameters within range) */ + if (srcSize == 0) srcSize = ZSTD_CONTENTSIZE_UNKNOWN; return ZSTD_adjustCParams_internal(cPar, srcSize, dictSize); } +static ZSTD_compressionParameters ZSTD_getCParams_internal(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize); +static ZSTD_parameters ZSTD_getParams_internal(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize); + ZSTD_compressionParameters ZSTD_getCParamsFromCCtxParams( const ZSTD_CCtx_params* CCtxParams, U64 srcSizeHint, size_t dictSize) { @@ -1059,7 +1081,7 @@ ZSTD_compressionParameters ZSTD_getCParamsFromCCtxParams( if (srcSizeHint == ZSTD_CONTENTSIZE_UNKNOWN && CCtxParams->srcSizeHint > 0) { srcSizeHint = CCtxParams->srcSizeHint; } - cParams = ZSTD_getCParams(CCtxParams->compressionLevel, srcSizeHint, dictSize); + cParams = ZSTD_getCParams_internal(CCtxParams->compressionLevel, srcSizeHint, dictSize); if (CCtxParams->ldmParams.enableLdm) cParams.windowLog = ZSTD_LDM_DEFAULT_WINDOW_LOG; if (CCtxParams->cParams.windowLog) cParams.windowLog = CCtxParams->cParams.windowLog; if (CCtxParams->cParams.hashLog) cParams.hashLog = CCtxParams->cParams.hashLog; @@ -1069,6 +1091,7 @@ ZSTD_compressionParameters ZSTD_getCParamsFromCCtxParams( if (CCtxParams->cParams.targetLength) cParams.targetLength = CCtxParams->cParams.targetLength; if (CCtxParams->cParams.strategy) cParams.strategy = CCtxParams->cParams.strategy; assert(!ZSTD_checkCParams(cParams)); + /* srcSizeHint == 0 means 0 */ return ZSTD_adjustCParams_internal(cParams, srcSizeHint, dictSize); } @@ -1104,7 +1127,7 @@ size_t ZSTD_estimateCCtxSize_usingCCtxParams(const ZSTD_CCtx_params* params) { RETURN_ERROR_IF(params->nbWorkers > 0, GENERIC, "Estimate CCtx size is supported for single-threaded compression only."); { ZSTD_compressionParameters const cParams = - ZSTD_getCParamsFromCCtxParams(params, 0, 0); + ZSTD_getCParamsFromCCtxParams(params, ZSTD_CONTENTSIZE_UNKNOWN, 0); size_t const blockSize = MIN(ZSTD_BLOCKSIZE_MAX, (size_t)1 << cParams.windowLog); U32 const divider = (cParams.minMatch==3) ? 3 : 4; size_t const maxNbSeq = blockSize / divider; @@ -1118,13 +1141,26 @@ size_t ZSTD_estimateCCtxSize_usingCCtxParams(const ZSTD_CCtx_params* params) size_t const ldmSpace = ZSTD_ldm_getTableSize(params->ldmParams); size_t const ldmSeqSpace = ZSTD_cwksp_alloc_size(ZSTD_ldm_getMaxNbSeq(params->ldmParams, blockSize) * sizeof(rawSeq)); - size_t const neededSpace = entropySpace + blockStateSpace + tokenSpace + - matchStateSize + ldmSpace + ldmSeqSpace; + /* estimateCCtxSize is for one-shot compression. So no buffers should + * be needed. However, we still allocate two 0-sized buffers, which can + * take space under ASAN. */ + size_t const bufferSpace = ZSTD_cwksp_alloc_size(0) + + ZSTD_cwksp_alloc_size(0); + size_t const cctxSpace = ZSTD_cwksp_alloc_size(sizeof(ZSTD_CCtx)); - DEBUGLOG(5, "sizeof(ZSTD_CCtx) : %u", (U32)cctxSpace); + size_t const neededSpace = + cctxSpace + + entropySpace + + blockStateSpace + + ldmSpace + + ldmSeqSpace + + matchStateSize + + tokenSpace + + bufferSpace; + DEBUGLOG(5, "estimate workspace : %u", (U32)neededSpace); - return cctxSpace + neededSpace; + return neededSpace; } } @@ -1136,7 +1172,7 @@ size_t ZSTD_estimateCCtxSize_usingCParams(ZSTD_compressionParameters cParams) static size_t ZSTD_estimateCCtxSize_internal(int compressionLevel) { - ZSTD_compressionParameters const cParams = ZSTD_getCParams(compressionLevel, 0, 0); + ZSTD_compressionParameters const cParams = ZSTD_getCParams_internal(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, 0); return ZSTD_estimateCCtxSize_usingCParams(cParams); } @@ -1155,7 +1191,7 @@ size_t ZSTD_estimateCStreamSize_usingCCtxParams(const ZSTD_CCtx_params* params) { RETURN_ERROR_IF(params->nbWorkers > 0, GENERIC, "Estimate CCtx size is supported for single-threaded compression only."); { ZSTD_compressionParameters const cParams = - ZSTD_getCParamsFromCCtxParams(params, 0, 0); + ZSTD_getCParamsFromCCtxParams(params, ZSTD_CONTENTSIZE_UNKNOWN, 0); size_t const CCtxSize = ZSTD_estimateCCtxSize_usingCCtxParams(params); size_t const blockSize = MIN(ZSTD_BLOCKSIZE_MAX, (size_t)1 << cParams.windowLog); size_t const inBuffSize = ((size_t)1 << cParams.windowLog) + blockSize; @@ -1175,7 +1211,7 @@ size_t ZSTD_estimateCStreamSize_usingCParams(ZSTD_compressionParameters cParams) static size_t ZSTD_estimateCStreamSize_internal(int compressionLevel) { - ZSTD_compressionParameters const cParams = ZSTD_getCParams(compressionLevel, 0, 0); + ZSTD_compressionParameters const cParams = ZSTD_getCParams_internal(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, 0); return ZSTD_estimateCStreamSize_usingCParams(cParams); } @@ -1243,7 +1279,7 @@ static void ZSTD_assertEqualCParams(ZSTD_compressionParameters cParams1, assert(cParams1.strategy == cParams2.strategy); } -static void ZSTD_reset_compressedBlockState(ZSTD_compressedBlockState_t* bs) +void ZSTD_reset_compressedBlockState(ZSTD_compressedBlockState_t* bs) { int i; for (i = 0; i < ZSTD_REP_NUM; ++i) @@ -1320,10 +1356,7 @@ ZSTD_reset_matchState(ZSTD_matchState_t* ms, DEBUGLOG(4, "reset indices : %u", forceResetIndex == ZSTDirp_reset); if (forceResetIndex == ZSTDirp_reset) { - memset(&ms->window, 0, sizeof(ms->window)); - ms->window.dictLimit = 1; /* start from 1, so that 1st position is valid */ - ms->window.lowLimit = 1; /* it ensures first and later CCtx usages compress the same */ - ms->window.nextSrc = ms->window.base + 1; /* see issue #1241 */ + ZSTD_window_init(&ms->window); ZSTD_cwksp_mark_tables_dirty(ws); } @@ -1416,13 +1449,13 @@ static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc, size_t const matchStateSize = ZSTD_sizeof_matchState(¶ms.cParams, /* forCCtx */ 1); size_t const maxNbLdmSeq = ZSTD_ldm_getMaxNbSeq(params.ldmParams, blockSize); - ZSTD_indexResetPolicy_e needsIndexReset = ZSTDirp_continue; + ZSTD_indexResetPolicy_e needsIndexReset = zc->initialized ? ZSTDirp_continue : ZSTDirp_reset; if (ZSTD_indexTooCloseToMax(zc->blockState.matchState.window)) { needsIndexReset = ZSTDirp_reset; } - ZSTD_cwksp_bump_oversized_duration(ws, 0); + if (!zc->staticSize) ZSTD_cwksp_bump_oversized_duration(ws, 0); /* Check if workspace is large enough, alloc a new one if needed */ { size_t const cctxSpace = zc->staticSize ? ZSTD_cwksp_alloc_size(sizeof(ZSTD_CCtx)) : 0; @@ -1459,7 +1492,7 @@ static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc, needsIndexReset = ZSTDirp_reset; ZSTD_cwksp_free(ws, zc->customMem); - FORWARD_IF_ERROR(ZSTD_cwksp_create(ws, neededSpace, zc->customMem)); + FORWARD_IF_ERROR(ZSTD_cwksp_create(ws, neededSpace, zc->customMem), ""); DEBUGLOG(5, "reserving object space"); /* Statically sized space. @@ -1530,7 +1563,7 @@ static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc, ¶ms.cParams, crp, needsIndexReset, - ZSTD_resetTarget_CCtx)); + ZSTD_resetTarget_CCtx), ""); /* ldm hash table */ if (params.ldmParams.enableLdm) { @@ -1541,11 +1574,13 @@ static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc, zc->ldmSequences = (rawSeq*)ZSTD_cwksp_reserve_aligned(ws, maxNbLdmSeq * sizeof(rawSeq)); zc->maxNbLdmSequences = maxNbLdmSeq; - memset(&zc->ldmState.window, 0, sizeof(zc->ldmState.window)); + ZSTD_window_init(&zc->ldmState.window); ZSTD_window_clear(&zc->ldmState.window); + zc->ldmState.loadedDictEnd = 0; } DEBUGLOG(3, "wksp: finished allocating, %zd bytes remain available", ZSTD_cwksp_available_space(ws)); + zc->initialized = 1; return 0; } @@ -1603,10 +1638,11 @@ ZSTD_resetCCtx_byAttachingCDict(ZSTD_CCtx* cctx, assert(windowLog != 0); /* Resize working context table params for input only, since the dict * has its own tables. */ + /* pledgeSrcSize == 0 means 0! */ params.cParams = ZSTD_adjustCParams_internal(*cdict_cParams, pledgedSrcSize, 0); params.cParams.windowLog = windowLog; FORWARD_IF_ERROR(ZSTD_resetCCtx_internal(cctx, params, pledgedSrcSize, - ZSTDcrp_makeClean, zbuff)); + ZSTDcrp_makeClean, zbuff), ""); assert(cctx->appliedParams.cParams.strategy == cdict_cParams->strategy); } @@ -1655,7 +1691,7 @@ static size_t ZSTD_resetCCtx_byCopyingCDict(ZSTD_CCtx* cctx, params.cParams = *cdict_cParams; params.cParams.windowLog = windowLog; FORWARD_IF_ERROR(ZSTD_resetCCtx_internal(cctx, params, pledgedSrcSize, - ZSTDcrp_leaveDirty, zbuff)); + ZSTDcrp_leaveDirty, zbuff), ""); assert(cctx->appliedParams.cParams.strategy == cdict_cParams->strategy); assert(cctx->appliedParams.cParams.hashLog == cdict_cParams->hashLog); assert(cctx->appliedParams.cParams.chainLog == cdict_cParams->chainLog); @@ -1736,7 +1772,8 @@ static size_t ZSTD_copyCCtx_internal(ZSTD_CCtx* dstCCtx, ZSTD_buffered_policy_e zbuff) { DEBUGLOG(5, "ZSTD_copyCCtx_internal"); - RETURN_ERROR_IF(srcCCtx->stage!=ZSTDcs_init, stage_wrong); + RETURN_ERROR_IF(srcCCtx->stage!=ZSTDcs_init, stage_wrong, + "Can't copy a ctx that's not in init stage."); memcpy(&dstCCtx->customMem, &srcCCtx->customMem, sizeof(ZSTD_customMem)); { ZSTD_CCtx_params params = dstCCtx->requestedParams; @@ -1889,16 +1926,6 @@ static void ZSTD_reduceIndex (ZSTD_matchState_t* ms, ZSTD_CCtx_params const* par /* See doc/zstd_compression_format.md for detailed format description */ -static size_t ZSTD_noCompressBlock (void* dst, size_t dstCapacity, const void* src, size_t srcSize, U32 lastBlock) -{ - U32 const cBlockHeader24 = lastBlock + (((U32)bt_raw)<<1) + (U32)(srcSize << 3); - RETURN_ERROR_IF(srcSize + ZSTD_blockHeaderSize > dstCapacity, - dstSize_tooSmall); - MEM_writeLE24(dst, cBlockHeader24); - memcpy((BYTE*)dst + ZSTD_blockHeaderSize, src, srcSize); - return ZSTD_blockHeaderSize + srcSize; -} - void ZSTD_seqToCodes(const seqStore_t* seqStorePtr) { const seqDef* const sequences = seqStorePtr->sequencesStart; @@ -1921,19 +1948,14 @@ void ZSTD_seqToCodes(const seqStore_t* seqStorePtr) mlCodeTable[seqStorePtr->longLengthPos] = MaxML; } -static int ZSTD_disableLiteralsCompression(const ZSTD_CCtx_params* cctxParams) +/* ZSTD_useTargetCBlockSize(): + * Returns if target compressed block size param is being used. + * If used, compression will do best effort to make a compressed block size to be around targetCBlockSize. + * Returns 1 if true, 0 otherwise. */ +static int ZSTD_useTargetCBlockSize(const ZSTD_CCtx_params* cctxParams) { - switch (cctxParams->literalCompressionMode) { - case ZSTD_lcm_huffman: - return 0; - case ZSTD_lcm_uncompressed: - return 1; - default: - assert(0 /* impossible: pre-validated */); - /* fall-through */ - case ZSTD_lcm_auto: - return (cctxParams->cParams.strategy == ZSTD_fast) && (cctxParams->cParams.targetLength > 0); - } + DEBUGLOG(5, "ZSTD_useTargetCBlockSize (targetCBlockSize=%zu)", cctxParams->targetCBlockSize); + return (cctxParams->targetCBlockSize != 0); } /* ZSTD_compressSequences_internal(): @@ -1979,14 +2001,14 @@ ZSTD_compressSequences_internal(seqStore_t* seqStorePtr, literals, litSize, entropyWorkspace, entropyWkspSize, bmi2); - FORWARD_IF_ERROR(cSize); + FORWARD_IF_ERROR(cSize, "ZSTD_compressLiterals failed"); assert(cSize <= dstCapacity); op += cSize; } /* Sequences Header */ RETURN_ERROR_IF((oend-op) < 3 /*max nbSeq Size*/ + 1 /*seqHead*/, - dstSize_tooSmall); + dstSize_tooSmall, "Can't fit seq hdr in output buf!"); if (nbSeq < 128) { *op++ = (BYTE)nbSeq; } else if (nbSeq < LONGNBSEQ) { @@ -2031,7 +2053,7 @@ ZSTD_compressSequences_internal(seqStore_t* seqStorePtr, prevEntropy->fse.litlengthCTable, sizeof(prevEntropy->fse.litlengthCTable), entropyWorkspace, entropyWkspSize); - FORWARD_IF_ERROR(countSize); + FORWARD_IF_ERROR(countSize, "ZSTD_buildCTable for LitLens failed"); if (LLtype == set_compressed) lastNCount = op; op += countSize; @@ -2059,7 +2081,7 @@ ZSTD_compressSequences_internal(seqStore_t* seqStorePtr, prevEntropy->fse.offcodeCTable, sizeof(prevEntropy->fse.offcodeCTable), entropyWorkspace, entropyWkspSize); - FORWARD_IF_ERROR(countSize); + FORWARD_IF_ERROR(countSize, "ZSTD_buildCTable for Offsets failed"); if (Offtype == set_compressed) lastNCount = op; op += countSize; @@ -2085,7 +2107,7 @@ ZSTD_compressSequences_internal(seqStore_t* seqStorePtr, prevEntropy->fse.matchlengthCTable, sizeof(prevEntropy->fse.matchlengthCTable), entropyWorkspace, entropyWkspSize); - FORWARD_IF_ERROR(countSize); + FORWARD_IF_ERROR(countSize, "ZSTD_buildCTable for MatchLengths failed"); if (MLtype == set_compressed) lastNCount = op; op += countSize; @@ -2101,7 +2123,7 @@ ZSTD_compressSequences_internal(seqStore_t* seqStorePtr, CTable_LitLength, llCodeTable, sequences, nbSeq, longOffsets, bmi2); - FORWARD_IF_ERROR(bitstreamSize); + FORWARD_IF_ERROR(bitstreamSize, "ZSTD_encodeSequences failed"); op += bitstreamSize; assert(op <= oend); /* zstd versions <= 1.3.4 mistakenly report corruption when @@ -2145,7 +2167,7 @@ ZSTD_compressSequences(seqStore_t* seqStorePtr, */ if ((cSize == ERROR(dstSize_tooSmall)) & (srcSize <= dstCapacity)) return 0; /* block not compressed */ - FORWARD_IF_ERROR(cSize); + FORWARD_IF_ERROR(cSize, "ZSTD_compressSequences_internal failed"); /* Check compressibility */ { size_t const maxCSize = srcSize - ZSTD_minGain(srcSize, cctxParams->cParams.strategy); @@ -2271,7 +2293,7 @@ static size_t ZSTD_buildSeqStore(ZSTD_CCtx* zc, const void* src, size_t srcSize) /* Updates ldmSeqStore.size */ FORWARD_IF_ERROR(ZSTD_ldm_generateSequences(&zc->ldmState, &ldmSeqStore, &zc->appliedParams.ldmParams, - src, srcSize)); + src, srcSize), ""); /* Updates ldmSeqStore.pos */ lastLLSize = ZSTD_ldm_blockCompress(&ldmSeqStore, @@ -2347,7 +2369,7 @@ size_t ZSTD_getSequences(ZSTD_CCtx* zc, ZSTD_Sequence* outSeqs, void* dst = ZSTD_malloc(dstCapacity, ZSTD_defaultCMem); SeqCollector seqCollector; - RETURN_ERROR_IF(dst == NULL, memory_allocation); + RETURN_ERROR_IF(dst == NULL, memory_allocation, "NULL pointer!"); seqCollector.collectSequences = 1; seqCollector.seqStart = outSeqs; @@ -2370,6 +2392,25 @@ static int ZSTD_isRLE(const BYTE *ip, size_t length) { return 1; } +/* Returns true if the given block may be RLE. + * This is just a heuristic based on the compressibility. + * It may return both false positives and false negatives. + */ +static int ZSTD_maybeRLE(seqStore_t const* seqStore) +{ + size_t const nbSeqs = (size_t)(seqStore->sequences - seqStore->sequencesStart); + size_t const nbLits = (size_t)(seqStore->lit - seqStore->litStart); + + return nbSeqs < 4 && nbLits < 10; +} + +static void ZSTD_confirmRepcodesAndEntropyTables(ZSTD_CCtx* zc) +{ + ZSTD_compressedBlockState_t* const tmp = zc->blockState.prevCBlock; + zc->blockState.prevCBlock = zc->blockState.nextCBlock; + zc->blockState.nextCBlock = tmp; +} + static size_t ZSTD_compressBlock_internal(ZSTD_CCtx* zc, void* dst, size_t dstCapacity, const void* src, size_t srcSize, U32 frame) @@ -2387,7 +2428,7 @@ static size_t ZSTD_compressBlock_internal(ZSTD_CCtx* zc, (unsigned)zc->blockState.matchState.nextToUpdate); { const size_t bss = ZSTD_buildSeqStore(zc, src, srcSize); - FORWARD_IF_ERROR(bss); + FORWARD_IF_ERROR(bss, "ZSTD_buildSeqStore failed"); if (bss == ZSTDbss_noCompress) { cSize = 0; goto out; } } @@ -2420,10 +2461,7 @@ static size_t ZSTD_compressBlock_internal(ZSTD_CCtx* zc, out: if (!ZSTD_isError(cSize) && cSize > 1) { - /* confirm repcodes and entropy tables when emitting a compressed block */ - ZSTD_compressedBlockState_t* const tmp = zc->blockState.prevCBlock; - zc->blockState.prevCBlock = zc->blockState.nextCBlock; - zc->blockState.nextCBlock = tmp; + ZSTD_confirmRepcodesAndEntropyTables(zc); } /* We check that dictionaries have offset codes available for the first * block. After the first block, the offcode table might not have large @@ -2435,6 +2473,80 @@ out: return cSize; } +static size_t ZSTD_compressBlock_targetCBlockSize_body(ZSTD_CCtx* zc, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + const size_t bss, U32 lastBlock) +{ + DEBUGLOG(6, "Attempting ZSTD_compressSuperBlock()"); + if (bss == ZSTDbss_compress) { + if (/* We don't want to emit our first block as a RLE even if it qualifies because + * doing so will cause the decoder (cli only) to throw a "should consume all input error." + * This is only an issue for zstd <= v1.4.3 + */ + !zc->isFirstBlock && + ZSTD_maybeRLE(&zc->seqStore) && + ZSTD_isRLE((BYTE const*)src, srcSize)) + { + return ZSTD_rleCompressBlock(dst, dstCapacity, *(BYTE const*)src, srcSize, lastBlock); + } + /* Attempt superblock compression. + * + * Note that compressed size of ZSTD_compressSuperBlock() is not bound by the + * standard ZSTD_compressBound(). This is a problem, because even if we have + * space now, taking an extra byte now could cause us to run out of space later + * and violate ZSTD_compressBound(). + * + * Define blockBound(blockSize) = blockSize + ZSTD_blockHeaderSize. + * + * In order to respect ZSTD_compressBound() we must attempt to emit a raw + * uncompressed block in these cases: + * * cSize == 0: Return code for an uncompressed block. + * * cSize == dstSize_tooSmall: We may have expanded beyond blockBound(srcSize). + * ZSTD_noCompressBlock() will return dstSize_tooSmall if we are really out of + * output space. + * * cSize >= blockBound(srcSize): We have expanded the block too much so + * emit an uncompressed block. + */ + { + size_t const cSize = ZSTD_compressSuperBlock(zc, dst, dstCapacity, src, srcSize, lastBlock); + if (cSize != ERROR(dstSize_tooSmall)) { + size_t const maxCSize = srcSize - ZSTD_minGain(srcSize, zc->appliedParams.cParams.strategy); + FORWARD_IF_ERROR(cSize, "ZSTD_compressSuperBlock failed"); + if (cSize != 0 && cSize < maxCSize + ZSTD_blockHeaderSize) { + ZSTD_confirmRepcodesAndEntropyTables(zc); + return cSize; + } + } + } + } + + DEBUGLOG(6, "Resorting to ZSTD_noCompressBlock()"); + /* Superblock compression failed, attempt to emit a single no compress block. + * The decoder will be able to stream this block since it is uncompressed. + */ + return ZSTD_noCompressBlock(dst, dstCapacity, src, srcSize, lastBlock); +} + +static size_t ZSTD_compressBlock_targetCBlockSize(ZSTD_CCtx* zc, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + U32 lastBlock) +{ + size_t cSize = 0; + const size_t bss = ZSTD_buildSeqStore(zc, src, srcSize); + DEBUGLOG(5, "ZSTD_compressBlock_targetCBlockSize (dstCapacity=%u, dictLimit=%u, nextToUpdate=%u, srcSize=%zu)", + (unsigned)dstCapacity, (unsigned)zc->blockState.matchState.window.dictLimit, (unsigned)zc->blockState.matchState.nextToUpdate, srcSize); + FORWARD_IF_ERROR(bss, "ZSTD_buildSeqStore failed"); + + cSize = ZSTD_compressBlock_targetCBlockSize_body(zc, dst, dstCapacity, src, srcSize, bss, lastBlock); + FORWARD_IF_ERROR(cSize, "ZSTD_compressBlock_targetCBlockSize_body failed"); + + if (zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode == FSE_repeat_valid) + zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode = FSE_repeat_check; + + return cSize; +} static void ZSTD_overflowCorrectIfNeeded(ZSTD_matchState_t* ms, ZSTD_cwksp* ws, @@ -2478,6 +2590,7 @@ static size_t ZSTD_compress_frameChunk (ZSTD_CCtx* cctx, BYTE* const ostart = (BYTE*)dst; BYTE* op = ostart; U32 const maxDist = (U32)1 << cctx->appliedParams.cParams.windowLog; + assert(cctx->appliedParams.cParams.windowLog <= ZSTD_WINDOWLOG_MAX); DEBUGLOG(5, "ZSTD_compress_frameChunk (blockSize=%u)", (unsigned)blockSize); @@ -2500,21 +2613,31 @@ static size_t ZSTD_compress_frameChunk (ZSTD_CCtx* cctx, /* Ensure hash/chain table insertion resumes no sooner than lowlimit */ if (ms->nextToUpdate < ms->window.lowLimit) ms->nextToUpdate = ms->window.lowLimit; - { size_t cSize = ZSTD_compressBlock_internal(cctx, - op+ZSTD_blockHeaderSize, dstCapacity-ZSTD_blockHeaderSize, - ip, blockSize, 1 /* frame */); - FORWARD_IF_ERROR(cSize); - if (cSize == 0) { /* block is not compressible */ - cSize = ZSTD_noCompressBlock(op, dstCapacity, ip, blockSize, lastBlock); - FORWARD_IF_ERROR(cSize); + { size_t cSize; + if (ZSTD_useTargetCBlockSize(&cctx->appliedParams)) { + cSize = ZSTD_compressBlock_targetCBlockSize(cctx, op, dstCapacity, ip, blockSize, lastBlock); + FORWARD_IF_ERROR(cSize, "ZSTD_compressBlock_targetCBlockSize failed"); + assert(cSize > 0); + assert(cSize <= blockSize + ZSTD_blockHeaderSize); } else { - const U32 cBlockHeader = cSize == 1 ? - lastBlock + (((U32)bt_rle)<<1) + (U32)(blockSize << 3) : - lastBlock + (((U32)bt_compressed)<<1) + (U32)(cSize << 3); - MEM_writeLE24(op, cBlockHeader); - cSize += ZSTD_blockHeaderSize; + cSize = ZSTD_compressBlock_internal(cctx, + op+ZSTD_blockHeaderSize, dstCapacity-ZSTD_blockHeaderSize, + ip, blockSize, 1 /* frame */); + FORWARD_IF_ERROR(cSize, "ZSTD_compressBlock_internal failed"); + + if (cSize == 0) { /* block is not compressible */ + cSize = ZSTD_noCompressBlock(op, dstCapacity, ip, blockSize, lastBlock); + FORWARD_IF_ERROR(cSize, "ZSTD_noCompressBlock failed"); + } else { + U32 const cBlockHeader = cSize == 1 ? + lastBlock + (((U32)bt_rle)<<1) + (U32)(blockSize << 3) : + lastBlock + (((U32)bt_compressed)<<1) + (U32)(cSize << 3); + MEM_writeLE24(op, cBlockHeader); + cSize += ZSTD_blockHeaderSize; + } } + ip += blockSize; assert(remaining >= blockSize); remaining -= blockSize; @@ -2546,7 +2669,8 @@ static size_t ZSTD_writeFrameHeader(void* dst, size_t dstCapacity, size_t pos=0; assert(!(params->fParams.contentSizeFlag && pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN)); - RETURN_ERROR_IF(dstCapacity < ZSTD_FRAMEHEADERSIZE_MAX, dstSize_tooSmall); + RETURN_ERROR_IF(dstCapacity < ZSTD_FRAMEHEADERSIZE_MAX, dstSize_tooSmall, + "dst buf is too small to fit worst-case frame header size."); DEBUGLOG(4, "ZSTD_writeFrameHeader : dictIDFlag : %u ; dictID : %u ; dictIDSizeCode : %u", !params->fParams.noDictIDFlag, (unsigned)dictID, (unsigned)dictIDSizeCode); @@ -2582,7 +2706,8 @@ static size_t ZSTD_writeFrameHeader(void* dst, size_t dstCapacity, */ size_t ZSTD_writeLastEmptyBlock(void* dst, size_t dstCapacity) { - RETURN_ERROR_IF(dstCapacity < ZSTD_blockHeaderSize, dstSize_tooSmall); + RETURN_ERROR_IF(dstCapacity < ZSTD_blockHeaderSize, dstSize_tooSmall, + "dst buf is too small to write frame trailer empty block."); { U32 const cBlockHeader24 = 1 /*lastBlock*/ + (((U32)bt_raw)<<1); /* 0 size */ MEM_writeLE24(dst, cBlockHeader24); return ZSTD_blockHeaderSize; @@ -2591,9 +2716,11 @@ size_t ZSTD_writeLastEmptyBlock(void* dst, size_t dstCapacity) size_t ZSTD_referenceExternalSequences(ZSTD_CCtx* cctx, rawSeq* seq, size_t nbSeq) { - RETURN_ERROR_IF(cctx->stage != ZSTDcs_init, stage_wrong); + RETURN_ERROR_IF(cctx->stage != ZSTDcs_init, stage_wrong, + "wrong cctx stage"); RETURN_ERROR_IF(cctx->appliedParams.ldmParams.enableLdm, - parameter_unsupported); + parameter_unsupported, + "incompatible with ldm"); cctx->externSeqStore.seq = seq; cctx->externSeqStore.size = nbSeq; cctx->externSeqStore.capacity = nbSeq; @@ -2618,7 +2745,7 @@ static size_t ZSTD_compressContinue_internal (ZSTD_CCtx* cctx, if (frame && (cctx->stage==ZSTDcs_init)) { fhSize = ZSTD_writeFrameHeader(dst, dstCapacity, &cctx->appliedParams, cctx->pledgedSrcSizePlusOne-1, cctx->dictID); - FORWARD_IF_ERROR(fhSize); + FORWARD_IF_ERROR(fhSize, "ZSTD_writeFrameHeader failed"); assert(fhSize <= dstCapacity); dstCapacity -= fhSize; dst = (char*)dst + fhSize; @@ -2645,7 +2772,7 @@ static size_t ZSTD_compressContinue_internal (ZSTD_CCtx* cctx, { size_t const cSize = frame ? ZSTD_compress_frameChunk (cctx, dst, dstCapacity, src, srcSize, lastFrameChunk) : ZSTD_compressBlock_internal (cctx, dst, dstCapacity, src, srcSize, 0 /* frame */); - FORWARD_IF_ERROR(cSize); + FORWARD_IF_ERROR(cSize, "%s", frame ? "ZSTD_compress_frameChunk failed" : "ZSTD_compressBlock_internal failed"); cctx->consumedSrcSize += srcSize; cctx->producedCSize += (cSize + fhSize); assert(!(cctx->appliedParams.fParams.contentSizeFlag && cctx->pledgedSrcSizePlusOne == 0)); @@ -2682,7 +2809,7 @@ size_t ZSTD_compressBlock(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const { DEBUGLOG(5, "ZSTD_compressBlock: srcSize = %u", (unsigned)srcSize); { size_t const blockSizeMax = ZSTD_getBlockSize(cctx); - RETURN_ERROR_IF(srcSize > blockSizeMax, srcSize_wrong); } + RETURN_ERROR_IF(srcSize > blockSizeMax, srcSize_wrong, "input is larger than a block"); } return ZSTD_compressContinue_internal(cctx, dst, dstCapacity, src, srcSize, 0 /* frame mode */, 0 /* last chunk */); } @@ -2691,6 +2818,7 @@ size_t ZSTD_compressBlock(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const * @return : 0, or an error code */ static size_t ZSTD_loadDictionaryContent(ZSTD_matchState_t* ms, + ldmState_t* ls, ZSTD_cwksp* ws, ZSTD_CCtx_params const* params, const void* src, size_t srcSize, @@ -2702,6 +2830,11 @@ static size_t ZSTD_loadDictionaryContent(ZSTD_matchState_t* ms, ZSTD_window_update(&ms->window, src, srcSize); ms->loadedDictEnd = params->forceWindow ? 0 : (U32)(iend - ms->window.base); + if (params->ldmParams.enableLdm && ls != NULL) { + ZSTD_window_update(&ls->window, src, srcSize); + ls->loadedDictEnd = params->forceWindow ? 0 : (U32)(iend - ls->window.base); + } + /* Assert that we the ms params match the params we're being given */ ZSTD_assertEqualCParams(params->cParams, ms->cParams); @@ -2714,6 +2847,9 @@ static size_t ZSTD_loadDictionaryContent(ZSTD_matchState_t* ms, ZSTD_overflowCorrectIfNeeded(ms, ws, params, ip, ichunk); + if (params->ldmParams.enableLdm && ls != NULL) + ZSTD_ldm_fillHashTable(ls, (const BYTE*)src, (const BYTE*)src + srcSize, ¶ms->ldmParams); + switch(params->cParams.strategy) { case ZSTD_fast: @@ -2756,102 +2892,123 @@ static size_t ZSTD_loadDictionaryContent(ZSTD_matchState_t* ms, NOTE: This behavior is not standard and could be improved in the future. */ static size_t ZSTD_checkDictNCount(short* normalizedCounter, unsigned dictMaxSymbolValue, unsigned maxSymbolValue) { U32 s; - RETURN_ERROR_IF(dictMaxSymbolValue < maxSymbolValue, dictionary_corrupted); + RETURN_ERROR_IF(dictMaxSymbolValue < maxSymbolValue, dictionary_corrupted, "dict fse tables don't have all symbols"); for (s = 0; s <= maxSymbolValue; ++s) { - RETURN_ERROR_IF(normalizedCounter[s] == 0, dictionary_corrupted); + RETURN_ERROR_IF(normalizedCounter[s] == 0, dictionary_corrupted, "dict fse tables don't have all symbols"); } return 0; } - -/* Dictionary format : - * See : - * https://github.com/facebook/zstd/blob/master/doc/zstd_compression_format.md#dictionary-format - */ -/*! ZSTD_loadZstdDictionary() : - * @return : dictID, or an error code - * assumptions : magic number supposed already checked - * dictSize supposed >= 8 - */ -static size_t ZSTD_loadZstdDictionary(ZSTD_compressedBlockState_t* bs, - ZSTD_matchState_t* ms, - ZSTD_cwksp* ws, - ZSTD_CCtx_params const* params, - const void* dict, size_t dictSize, - ZSTD_dictTableLoadMethod_e dtlm, - void* workspace) +size_t ZSTD_loadCEntropy(ZSTD_compressedBlockState_t* bs, void* workspace, + short* offcodeNCount, unsigned* offcodeMaxValue, + const void* const dict, size_t dictSize) { - const BYTE* dictPtr = (const BYTE*)dict; + const BYTE* dictPtr = (const BYTE*)dict; /* skip magic num and dict ID */ const BYTE* const dictEnd = dictPtr + dictSize; - short offcodeNCount[MaxOff+1]; - unsigned offcodeMaxValue = MaxOff; - size_t dictID; + dictPtr += 8; + bs->entropy.huf.repeatMode = HUF_repeat_check; - ZSTD_STATIC_ASSERT(HUF_WORKSPACE_SIZE >= (1<<MAX(MLFSELog,LLFSELog))); - assert(dictSize >= 8); - assert(MEM_readLE32(dictPtr) == ZSTD_MAGIC_DICTIONARY); + { unsigned maxSymbolValue = 255; + unsigned hasZeroWeights = 1; + size_t const hufHeaderSize = HUF_readCTable((HUF_CElt*)bs->entropy.huf.CTable, &maxSymbolValue, dictPtr, + dictEnd-dictPtr, &hasZeroWeights); - dictPtr += 4; /* skip magic number */ - dictID = params->fParams.noDictIDFlag ? 0 : MEM_readLE32(dictPtr); - dictPtr += 4; + /* We only set the loaded table as valid if it contains all non-zero + * weights. Otherwise, we set it to check */ + if (!hasZeroWeights) + bs->entropy.huf.repeatMode = HUF_repeat_valid; - { unsigned maxSymbolValue = 255; - size_t const hufHeaderSize = HUF_readCTable((HUF_CElt*)bs->entropy.huf.CTable, &maxSymbolValue, dictPtr, dictEnd-dictPtr); - RETURN_ERROR_IF(HUF_isError(hufHeaderSize), dictionary_corrupted); - RETURN_ERROR_IF(maxSymbolValue < 255, dictionary_corrupted); + RETURN_ERROR_IF(HUF_isError(hufHeaderSize), dictionary_corrupted, ""); + RETURN_ERROR_IF(maxSymbolValue < 255, dictionary_corrupted, ""); dictPtr += hufHeaderSize; } { unsigned offcodeLog; - size_t const offcodeHeaderSize = FSE_readNCount(offcodeNCount, &offcodeMaxValue, &offcodeLog, dictPtr, dictEnd-dictPtr); - RETURN_ERROR_IF(FSE_isError(offcodeHeaderSize), dictionary_corrupted); - RETURN_ERROR_IF(offcodeLog > OffFSELog, dictionary_corrupted); + size_t const offcodeHeaderSize = FSE_readNCount(offcodeNCount, offcodeMaxValue, &offcodeLog, dictPtr, dictEnd-dictPtr); + RETURN_ERROR_IF(FSE_isError(offcodeHeaderSize), dictionary_corrupted, ""); + RETURN_ERROR_IF(offcodeLog > OffFSELog, dictionary_corrupted, ""); /* Defer checking offcodeMaxValue because we need to know the size of the dictionary content */ /* fill all offset symbols to avoid garbage at end of table */ RETURN_ERROR_IF(FSE_isError(FSE_buildCTable_wksp( bs->entropy.fse.offcodeCTable, offcodeNCount, MaxOff, offcodeLog, workspace, HUF_WORKSPACE_SIZE)), - dictionary_corrupted); + dictionary_corrupted, ""); dictPtr += offcodeHeaderSize; } { short matchlengthNCount[MaxML+1]; unsigned matchlengthMaxValue = MaxML, matchlengthLog; size_t const matchlengthHeaderSize = FSE_readNCount(matchlengthNCount, &matchlengthMaxValue, &matchlengthLog, dictPtr, dictEnd-dictPtr); - RETURN_ERROR_IF(FSE_isError(matchlengthHeaderSize), dictionary_corrupted); - RETURN_ERROR_IF(matchlengthLog > MLFSELog, dictionary_corrupted); + RETURN_ERROR_IF(FSE_isError(matchlengthHeaderSize), dictionary_corrupted, ""); + RETURN_ERROR_IF(matchlengthLog > MLFSELog, dictionary_corrupted, ""); /* Every match length code must have non-zero probability */ - FORWARD_IF_ERROR( ZSTD_checkDictNCount(matchlengthNCount, matchlengthMaxValue, MaxML)); + FORWARD_IF_ERROR( ZSTD_checkDictNCount(matchlengthNCount, matchlengthMaxValue, MaxML), ""); RETURN_ERROR_IF(FSE_isError(FSE_buildCTable_wksp( bs->entropy.fse.matchlengthCTable, matchlengthNCount, matchlengthMaxValue, matchlengthLog, workspace, HUF_WORKSPACE_SIZE)), - dictionary_corrupted); + dictionary_corrupted, ""); dictPtr += matchlengthHeaderSize; } { short litlengthNCount[MaxLL+1]; unsigned litlengthMaxValue = MaxLL, litlengthLog; size_t const litlengthHeaderSize = FSE_readNCount(litlengthNCount, &litlengthMaxValue, &litlengthLog, dictPtr, dictEnd-dictPtr); - RETURN_ERROR_IF(FSE_isError(litlengthHeaderSize), dictionary_corrupted); - RETURN_ERROR_IF(litlengthLog > LLFSELog, dictionary_corrupted); + RETURN_ERROR_IF(FSE_isError(litlengthHeaderSize), dictionary_corrupted, ""); + RETURN_ERROR_IF(litlengthLog > LLFSELog, dictionary_corrupted, ""); /* Every literal length code must have non-zero probability */ - FORWARD_IF_ERROR( ZSTD_checkDictNCount(litlengthNCount, litlengthMaxValue, MaxLL)); + FORWARD_IF_ERROR( ZSTD_checkDictNCount(litlengthNCount, litlengthMaxValue, MaxLL), ""); RETURN_ERROR_IF(FSE_isError(FSE_buildCTable_wksp( bs->entropy.fse.litlengthCTable, litlengthNCount, litlengthMaxValue, litlengthLog, workspace, HUF_WORKSPACE_SIZE)), - dictionary_corrupted); + dictionary_corrupted, ""); dictPtr += litlengthHeaderSize; } - RETURN_ERROR_IF(dictPtr+12 > dictEnd, dictionary_corrupted); + RETURN_ERROR_IF(dictPtr+12 > dictEnd, dictionary_corrupted, ""); bs->rep[0] = MEM_readLE32(dictPtr+0); bs->rep[1] = MEM_readLE32(dictPtr+4); bs->rep[2] = MEM_readLE32(dictPtr+8); dictPtr += 12; + return dictPtr - (const BYTE*)dict; +} + +/* Dictionary format : + * See : + * https://github.com/facebook/zstd/blob/master/doc/zstd_compression_format.md#dictionary-format + */ +/*! ZSTD_loadZstdDictionary() : + * @return : dictID, or an error code + * assumptions : magic number supposed already checked + * dictSize supposed >= 8 + */ +static size_t ZSTD_loadZstdDictionary(ZSTD_compressedBlockState_t* bs, + ZSTD_matchState_t* ms, + ZSTD_cwksp* ws, + ZSTD_CCtx_params const* params, + const void* dict, size_t dictSize, + ZSTD_dictTableLoadMethod_e dtlm, + void* workspace) +{ + const BYTE* dictPtr = (const BYTE*)dict; + const BYTE* const dictEnd = dictPtr + dictSize; + short offcodeNCount[MaxOff+1]; + unsigned offcodeMaxValue = MaxOff; + size_t dictID; + size_t eSize; + + ZSTD_STATIC_ASSERT(HUF_WORKSPACE_SIZE >= (1<<MAX(MLFSELog,LLFSELog))); + assert(dictSize >= 8); + assert(MEM_readLE32(dictPtr) == ZSTD_MAGIC_DICTIONARY); + + dictID = params->fParams.noDictIDFlag ? 0 : MEM_readLE32(dictPtr + 4 /* skip magic number */ ); + eSize = ZSTD_loadCEntropy(bs, workspace, offcodeNCount, &offcodeMaxValue, dict, dictSize); + FORWARD_IF_ERROR(eSize, "ZSTD_loadCEntropy failed"); + dictPtr += eSize; + { size_t const dictContentSize = (size_t)(dictEnd - dictPtr); U32 offcodeMax = MaxOff; if (dictContentSize <= ((U32)-1) - 128 KB) { @@ -2859,20 +3016,19 @@ static size_t ZSTD_loadZstdDictionary(ZSTD_compressedBlockState_t* bs, offcodeMax = ZSTD_highbit32(maxOffset); /* Calculate minimum offset code required to represent maxOffset */ } /* All offset values <= dictContentSize + 128 KB must be representable */ - FORWARD_IF_ERROR(ZSTD_checkDictNCount(offcodeNCount, offcodeMaxValue, MIN(offcodeMax, MaxOff))); + FORWARD_IF_ERROR(ZSTD_checkDictNCount(offcodeNCount, offcodeMaxValue, MIN(offcodeMax, MaxOff)), ""); /* All repCodes must be <= dictContentSize and != 0*/ { U32 u; for (u=0; u<3; u++) { - RETURN_ERROR_IF(bs->rep[u] == 0, dictionary_corrupted); - RETURN_ERROR_IF(bs->rep[u] > dictContentSize, dictionary_corrupted); + RETURN_ERROR_IF(bs->rep[u] == 0, dictionary_corrupted, ""); + RETURN_ERROR_IF(bs->rep[u] > dictContentSize, dictionary_corrupted, ""); } } - bs->entropy.huf.repeatMode = HUF_repeat_valid; bs->entropy.fse.offcode_repeatMode = FSE_repeat_valid; bs->entropy.fse.matchlength_repeatMode = FSE_repeat_valid; bs->entropy.fse.litlength_repeatMode = FSE_repeat_valid; FORWARD_IF_ERROR(ZSTD_loadDictionaryContent( - ms, ws, params, dictPtr, dictContentSize, dtlm)); + ms, NULL, ws, params, dictPtr, dictContentSize, dtlm), ""); return dictID; } } @@ -2882,6 +3038,7 @@ static size_t ZSTD_loadZstdDictionary(ZSTD_compressedBlockState_t* bs, static size_t ZSTD_compress_insertDictionary(ZSTD_compressedBlockState_t* bs, ZSTD_matchState_t* ms, + ldmState_t* ls, ZSTD_cwksp* ws, const ZSTD_CCtx_params* params, const void* dict, size_t dictSize, @@ -2891,7 +3048,7 @@ ZSTD_compress_insertDictionary(ZSTD_compressedBlockState_t* bs, { DEBUGLOG(4, "ZSTD_compress_insertDictionary (dictSize=%u)", (U32)dictSize); if ((dict==NULL) || (dictSize<8)) { - RETURN_ERROR_IF(dictContentType == ZSTD_dct_fullDict, dictionary_wrong); + RETURN_ERROR_IF(dictContentType == ZSTD_dct_fullDict, dictionary_wrong, ""); return 0; } @@ -2899,15 +3056,15 @@ ZSTD_compress_insertDictionary(ZSTD_compressedBlockState_t* bs, /* dict restricted modes */ if (dictContentType == ZSTD_dct_rawContent) - return ZSTD_loadDictionaryContent(ms, ws, params, dict, dictSize, dtlm); + return ZSTD_loadDictionaryContent(ms, ls, ws, params, dict, dictSize, dtlm); if (MEM_readLE32(dict) != ZSTD_MAGIC_DICTIONARY) { if (dictContentType == ZSTD_dct_auto) { DEBUGLOG(4, "raw content dictionary detected"); return ZSTD_loadDictionaryContent( - ms, ws, params, dict, dictSize, dtlm); + ms, ls, ws, params, dict, dictSize, dtlm); } - RETURN_ERROR_IF(dictContentType == ZSTD_dct_fullDict, dictionary_wrong); + RETURN_ERROR_IF(dictContentType == ZSTD_dct_fullDict, dictionary_wrong, ""); assert(0); /* impossible */ } @@ -2944,17 +3101,18 @@ static size_t ZSTD_compressBegin_internal(ZSTD_CCtx* cctx, } FORWARD_IF_ERROR( ZSTD_resetCCtx_internal(cctx, *params, pledgedSrcSize, - ZSTDcrp_makeClean, zbuff) ); + ZSTDcrp_makeClean, zbuff) , ""); { size_t const dictID = cdict ? ZSTD_compress_insertDictionary( cctx->blockState.prevCBlock, &cctx->blockState.matchState, - &cctx->workspace, params, cdict->dictContent, cdict->dictContentSize, - dictContentType, dtlm, cctx->entropyWorkspace) + &cctx->ldmState, &cctx->workspace, &cctx->appliedParams, cdict->dictContent, + cdict->dictContentSize, dictContentType, dtlm, + cctx->entropyWorkspace) : ZSTD_compress_insertDictionary( cctx->blockState.prevCBlock, &cctx->blockState.matchState, - &cctx->workspace, params, dict, dictSize, + &cctx->ldmState, &cctx->workspace, &cctx->appliedParams, dict, dictSize, dictContentType, dtlm, cctx->entropyWorkspace); - FORWARD_IF_ERROR(dictID); + FORWARD_IF_ERROR(dictID, "ZSTD_compress_insertDictionary failed"); assert(dictID <= UINT_MAX); cctx->dictID = (U32)dictID; } @@ -2971,7 +3129,7 @@ size_t ZSTD_compressBegin_advanced_internal(ZSTD_CCtx* cctx, { DEBUGLOG(4, "ZSTD_compressBegin_advanced_internal: wlog=%u", params->cParams.windowLog); /* compression parameters verification and optimization */ - FORWARD_IF_ERROR( ZSTD_checkCParams(params->cParams) ); + FORWARD_IF_ERROR( ZSTD_checkCParams(params->cParams) , ""); return ZSTD_compressBegin_internal(cctx, dict, dictSize, dictContentType, dtlm, cdict, @@ -2986,7 +3144,7 @@ size_t ZSTD_compressBegin_advanced(ZSTD_CCtx* cctx, ZSTD_parameters params, unsigned long long pledgedSrcSize) { ZSTD_CCtx_params const cctxParams = - ZSTD_assignParamsToCCtxParams(&cctx->requestedParams, params); + ZSTD_assignParamsToCCtxParams(&cctx->requestedParams, ¶ms); return ZSTD_compressBegin_advanced_internal(cctx, dict, dictSize, ZSTD_dct_auto, ZSTD_dtlm_fast, NULL /*cdict*/, @@ -2995,9 +3153,9 @@ size_t ZSTD_compressBegin_advanced(ZSTD_CCtx* cctx, size_t ZSTD_compressBegin_usingDict(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, int compressionLevel) { - ZSTD_parameters const params = ZSTD_getParams(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, dictSize); + ZSTD_parameters const params = ZSTD_getParams_internal(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, dictSize); ZSTD_CCtx_params const cctxParams = - ZSTD_assignParamsToCCtxParams(&cctx->requestedParams, params); + ZSTD_assignParamsToCCtxParams(&cctx->requestedParams, ¶ms); DEBUGLOG(4, "ZSTD_compressBegin_usingDict (dictSize=%u)", (unsigned)dictSize); return ZSTD_compressBegin_internal(cctx, dict, dictSize, ZSTD_dct_auto, ZSTD_dtlm_fast, NULL, &cctxParams, ZSTD_CONTENTSIZE_UNKNOWN, ZSTDb_not_buffered); @@ -3024,7 +3182,7 @@ static size_t ZSTD_writeEpilogue(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity) /* special case : empty frame */ if (cctx->stage == ZSTDcs_init) { fhSize = ZSTD_writeFrameHeader(dst, dstCapacity, &cctx->appliedParams, 0, 0); - FORWARD_IF_ERROR(fhSize); + FORWARD_IF_ERROR(fhSize, "ZSTD_writeFrameHeader failed"); dstCapacity -= fhSize; op += fhSize; cctx->stage = ZSTDcs_ongoing; @@ -3033,7 +3191,7 @@ static size_t ZSTD_writeEpilogue(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity) if (cctx->stage != ZSTDcs_ending) { /* write one last empty block, make it the "last" block */ U32 const cBlockHeader24 = 1 /* last block */ + (((U32)bt_raw)<<1) + 0; - RETURN_ERROR_IF(dstCapacity<4, dstSize_tooSmall); + RETURN_ERROR_IF(dstCapacity<4, dstSize_tooSmall, "no room for epilogue"); MEM_writeLE32(op, cBlockHeader24); op += ZSTD_blockHeaderSize; dstCapacity -= ZSTD_blockHeaderSize; @@ -3041,7 +3199,7 @@ static size_t ZSTD_writeEpilogue(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity) if (cctx->appliedParams.fParams.checksumFlag) { U32 const checksum = (U32) XXH64_digest(&cctx->xxhState); - RETURN_ERROR_IF(dstCapacity<4, dstSize_tooSmall); + RETURN_ERROR_IF(dstCapacity<4, dstSize_tooSmall, "no room for checksum"); DEBUGLOG(4, "ZSTD_writeEpilogue: write checksum : %08X", (unsigned)checksum); MEM_writeLE32(op, checksum); op += 4; @@ -3059,9 +3217,9 @@ size_t ZSTD_compressEnd (ZSTD_CCtx* cctx, size_t const cSize = ZSTD_compressContinue_internal(cctx, dst, dstCapacity, src, srcSize, 1 /* frame mode */, 1 /* last chunk */); - FORWARD_IF_ERROR(cSize); + FORWARD_IF_ERROR(cSize, "ZSTD_compressContinue_internal failed"); endResult = ZSTD_writeEpilogue(cctx, (char*)dst + cSize, dstCapacity-cSize); - FORWARD_IF_ERROR(endResult); + FORWARD_IF_ERROR(endResult, "ZSTD_writeEpilogue failed"); assert(!(cctx->appliedParams.fParams.contentSizeFlag && cctx->pledgedSrcSizePlusOne == 0)); if (cctx->pledgedSrcSizePlusOne != 0) { /* control src size */ ZSTD_STATIC_ASSERT(ZSTD_CONTENTSIZE_UNKNOWN == (unsigned long long)-1); @@ -3081,7 +3239,7 @@ static size_t ZSTD_compress_internal (ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize, const void* dict,size_t dictSize, - ZSTD_parameters params) + const ZSTD_parameters* params) { ZSTD_CCtx_params const cctxParams = ZSTD_assignParamsToCCtxParams(&cctx->requestedParams, params); @@ -3100,12 +3258,12 @@ size_t ZSTD_compress_advanced (ZSTD_CCtx* cctx, ZSTD_parameters params) { DEBUGLOG(4, "ZSTD_compress_advanced"); - FORWARD_IF_ERROR(ZSTD_checkCParams(params.cParams)); + FORWARD_IF_ERROR(ZSTD_checkCParams(params.cParams), ""); return ZSTD_compress_internal(cctx, dst, dstCapacity, src, srcSize, dict, dictSize, - params); + ¶ms); } /* Internal */ @@ -3119,7 +3277,7 @@ size_t ZSTD_compress_advanced_internal( DEBUGLOG(4, "ZSTD_compress_advanced_internal (srcSize:%u)", (unsigned)srcSize); FORWARD_IF_ERROR( ZSTD_compressBegin_internal(cctx, dict, dictSize, ZSTD_dct_auto, ZSTD_dtlm_fast, NULL, - params, srcSize, ZSTDb_not_buffered) ); + params, srcSize, ZSTDb_not_buffered) , ""); return ZSTD_compressEnd(cctx, dst, dstCapacity, src, srcSize); } @@ -3129,8 +3287,9 @@ size_t ZSTD_compress_usingDict(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, int compressionLevel) { - ZSTD_parameters const params = ZSTD_getParams(compressionLevel, srcSize + (!srcSize), dict ? dictSize : 0); - ZSTD_CCtx_params cctxParams = ZSTD_assignParamsToCCtxParams(&cctx->requestedParams, params); + ZSTD_parameters const params = ZSTD_getParams_internal(compressionLevel, srcSize, dict ? dictSize : 0); + ZSTD_CCtx_params cctxParams = ZSTD_assignParamsToCCtxParams(&cctx->requestedParams, ¶ms); + DEBUGLOG(4, "ZSTD_compress_usingDict (srcSize=%u)", (unsigned)srcSize); assert(params.fParams.contentSizeFlag == 1); return ZSTD_compress_advanced_internal(cctx, dst, dstCapacity, src, srcSize, dict, dictSize, &cctxParams); } @@ -3176,7 +3335,7 @@ size_t ZSTD_estimateCDictSize_advanced( size_t ZSTD_estimateCDictSize(size_t dictSize, int compressionLevel) { - ZSTD_compressionParameters const cParams = ZSTD_getCParams(compressionLevel, 0, dictSize); + ZSTD_compressionParameters const cParams = ZSTD_getCParams_internal(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, dictSize); return ZSTD_estimateCDictSize_advanced(dictSize, cParams, ZSTD_dlm_byCopy); } @@ -3203,7 +3362,7 @@ static size_t ZSTD_initCDict_internal( cdict->dictContent = dictBuffer; } else { void *internalBuffer = ZSTD_cwksp_reserve_object(&cdict->workspace, ZSTD_cwksp_align(dictSize, sizeof(void*))); - RETURN_ERROR_IF(!internalBuffer, memory_allocation); + RETURN_ERROR_IF(!internalBuffer, memory_allocation, "NULL pointer!"); cdict->dictContent = internalBuffer; memcpy(internalBuffer, dictBuffer, dictSize); } @@ -3220,7 +3379,7 @@ static size_t ZSTD_initCDict_internal( &cParams, ZSTDcrp_makeClean, ZSTDirp_reset, - ZSTD_resetTarget_CDict)); + ZSTD_resetTarget_CDict), ""); /* (Maybe) load the dictionary * Skips loading the dictionary if it is < 8 bytes. */ @@ -3230,10 +3389,10 @@ static size_t ZSTD_initCDict_internal( params.fParams.contentSizeFlag = 1; params.cParams = cParams; { size_t const dictID = ZSTD_compress_insertDictionary( - &cdict->cBlockState, &cdict->matchState, &cdict->workspace, + &cdict->cBlockState, &cdict->matchState, NULL, &cdict->workspace, ¶ms, cdict->dictContent, cdict->dictContentSize, dictContentType, ZSTD_dtlm_full, cdict->entropyWorkspace); - FORWARD_IF_ERROR(dictID); + FORWARD_IF_ERROR(dictID, "ZSTD_compress_insertDictionary failed"); assert(dictID <= (size_t)(U32)-1); cdict->dictID = (U32)dictID; } @@ -3287,7 +3446,7 @@ ZSTD_CDict* ZSTD_createCDict_advanced(const void* dictBuffer, size_t dictSize, ZSTD_CDict* ZSTD_createCDict(const void* dict, size_t dictSize, int compressionLevel) { - ZSTD_compressionParameters cParams = ZSTD_getCParams(compressionLevel, 0, dictSize); + ZSTD_compressionParameters cParams = ZSTD_getCParams_internal(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, dictSize); ZSTD_CDict* cdict = ZSTD_createCDict_advanced(dict, dictSize, ZSTD_dlm_byCopy, ZSTD_dct_auto, cParams, ZSTD_defaultCMem); @@ -3298,7 +3457,7 @@ ZSTD_CDict* ZSTD_createCDict(const void* dict, size_t dictSize, int compressionL ZSTD_CDict* ZSTD_createCDict_byReference(const void* dict, size_t dictSize, int compressionLevel) { - ZSTD_compressionParameters cParams = ZSTD_getCParams(compressionLevel, 0, dictSize); + ZSTD_compressionParameters cParams = ZSTD_getCParams_internal(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, dictSize); return ZSTD_createCDict_advanced(dict, dictSize, ZSTD_dlm_byRef, ZSTD_dct_auto, cParams, ZSTD_defaultCMem); @@ -3381,7 +3540,7 @@ size_t ZSTD_compressBegin_usingCDict_advanced( ZSTD_frameParameters const fParams, unsigned long long const pledgedSrcSize) { DEBUGLOG(4, "ZSTD_compressBegin_usingCDict_advanced"); - RETURN_ERROR_IF(cdict==NULL, dictionary_wrong); + RETURN_ERROR_IF(cdict==NULL, dictionary_wrong, "NULL pointer!"); { ZSTD_CCtx_params params = cctx->requestedParams; params.cParams = ( pledgedSrcSize < ZSTD_USE_CDICT_PARAMS_SRCSIZE_CUTOFF || pledgedSrcSize < cdict->dictContentSize * ZSTD_USE_CDICT_PARAMS_DICTSIZE_MULTIPLIER @@ -3425,7 +3584,7 @@ size_t ZSTD_compress_usingCDict_advanced(ZSTD_CCtx* cctx, const void* src, size_t srcSize, const ZSTD_CDict* cdict, ZSTD_frameParameters fParams) { - FORWARD_IF_ERROR(ZSTD_compressBegin_usingCDict_advanced(cctx, cdict, fParams, srcSize)); /* will check if cdict != NULL */ + FORWARD_IF_ERROR(ZSTD_compressBegin_usingCDict_advanced(cctx, cdict, fParams, srcSize), ""); /* will check if cdict != NULL */ return ZSTD_compressEnd(cctx, dst, dstCapacity, src, srcSize); } @@ -3497,7 +3656,7 @@ static size_t ZSTD_resetCStream_internal(ZSTD_CStream* cctx, dict, dictSize, dictContentType, ZSTD_dtlm_fast, cdict, ¶ms, pledgedSrcSize, - ZSTDb_buffered) ); + ZSTDb_buffered) , ""); cctx->inToCompress = 0; cctx->inBuffPos = 0; @@ -3519,8 +3678,8 @@ size_t ZSTD_resetCStream(ZSTD_CStream* zcs, unsigned long long pss) */ U64 const pledgedSrcSize = (pss==0) ? ZSTD_CONTENTSIZE_UNKNOWN : pss; DEBUGLOG(4, "ZSTD_resetCStream: pledgedSrcSize = %u", (unsigned)pledgedSrcSize); - FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) ); - FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) ); + FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); return 0; } @@ -3534,16 +3693,16 @@ size_t ZSTD_initCStream_internal(ZSTD_CStream* zcs, unsigned long long pledgedSrcSize) { DEBUGLOG(4, "ZSTD_initCStream_internal"); - FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) ); - FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) ); + FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); assert(!ZSTD_isError(ZSTD_checkCParams(params->cParams))); zcs->requestedParams = *params; assert(!((dict) && (cdict))); /* either dict or cdict, not both */ if (dict) { - FORWARD_IF_ERROR( ZSTD_CCtx_loadDictionary(zcs, dict, dictSize) ); + FORWARD_IF_ERROR( ZSTD_CCtx_loadDictionary(zcs, dict, dictSize) , ""); } else { /* Dictionary is cleared if !cdict */ - FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, cdict) ); + FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, cdict) , ""); } return 0; } @@ -3556,10 +3715,10 @@ size_t ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs, unsigned long long pledgedSrcSize) { DEBUGLOG(4, "ZSTD_initCStream_usingCDict_advanced"); - FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) ); - FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) ); + FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); zcs->requestedParams.fParams = fParams; - FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, cdict) ); + FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, cdict) , ""); return 0; } @@ -3567,8 +3726,8 @@ size_t ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs, size_t ZSTD_initCStream_usingCDict(ZSTD_CStream* zcs, const ZSTD_CDict* cdict) { DEBUGLOG(4, "ZSTD_initCStream_usingCDict"); - FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) ); - FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, cdict) ); + FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, cdict) , ""); return 0; } @@ -3587,20 +3746,20 @@ size_t ZSTD_initCStream_advanced(ZSTD_CStream* zcs, */ U64 const pledgedSrcSize = (pss==0 && params.fParams.contentSizeFlag==0) ? ZSTD_CONTENTSIZE_UNKNOWN : pss; DEBUGLOG(4, "ZSTD_initCStream_advanced"); - FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) ); - FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) ); - FORWARD_IF_ERROR( ZSTD_checkCParams(params.cParams) ); - zcs->requestedParams = ZSTD_assignParamsToCCtxParams(&zcs->requestedParams, params); - FORWARD_IF_ERROR( ZSTD_CCtx_loadDictionary(zcs, dict, dictSize) ); + FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); + FORWARD_IF_ERROR( ZSTD_checkCParams(params.cParams) , ""); + zcs->requestedParams = ZSTD_assignParamsToCCtxParams(&zcs->requestedParams, ¶ms); + FORWARD_IF_ERROR( ZSTD_CCtx_loadDictionary(zcs, dict, dictSize) , ""); return 0; } size_t ZSTD_initCStream_usingDict(ZSTD_CStream* zcs, const void* dict, size_t dictSize, int compressionLevel) { DEBUGLOG(4, "ZSTD_initCStream_usingDict"); - FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) ); - FORWARD_IF_ERROR( ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel) ); - FORWARD_IF_ERROR( ZSTD_CCtx_loadDictionary(zcs, dict, dictSize) ); + FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_loadDictionary(zcs, dict, dictSize) , ""); return 0; } @@ -3612,19 +3771,19 @@ size_t ZSTD_initCStream_srcSize(ZSTD_CStream* zcs, int compressionLevel, unsigne */ U64 const pledgedSrcSize = (pss==0) ? ZSTD_CONTENTSIZE_UNKNOWN : pss; DEBUGLOG(4, "ZSTD_initCStream_srcSize"); - FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) ); - FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, NULL) ); - FORWARD_IF_ERROR( ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel) ); - FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) ); + FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, NULL) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); return 0; } size_t ZSTD_initCStream(ZSTD_CStream* zcs, int compressionLevel) { DEBUGLOG(4, "ZSTD_initCStream"); - FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) ); - FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, NULL) ); - FORWARD_IF_ERROR( ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel) ); + FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, NULL) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel) , ""); return 0; } @@ -3637,14 +3796,6 @@ static size_t ZSTD_nextInputSizeHint(const ZSTD_CCtx* cctx) return hintInSize; } -static size_t ZSTD_limitCopy(void* dst, size_t dstCapacity, - const void* src, size_t srcSize) -{ - size_t const length = MIN(dstCapacity, srcSize); - if (length) memcpy(dst, src, length); - return length; -} - /** ZSTD_compressStream_generic(): * internal function for all *compressStream*() variants * non-static, because can be called from zstdmt_compress.c @@ -3655,11 +3806,11 @@ static size_t ZSTD_compressStream_generic(ZSTD_CStream* zcs, ZSTD_EndDirective const flushMode) { const char* const istart = (const char*)input->src; - const char* const iend = istart + input->size; - const char* ip = istart + input->pos; + const char* const iend = input->size != 0 ? istart + input->size : istart; + const char* ip = input->pos != 0 ? istart + input->pos : istart; char* const ostart = (char*)output->dst; - char* const oend = ostart + output->size; - char* op = ostart + output->pos; + char* const oend = output->size != 0 ? ostart + output->size : ostart; + char* op = output->pos != 0 ? ostart + output->pos : ostart; U32 someMoreWork = 1; /* check expectations */ @@ -3685,7 +3836,7 @@ static size_t ZSTD_compressStream_generic(ZSTD_CStream* zcs, size_t const cSize = ZSTD_compressEnd(zcs, op, oend-op, ip, iend-ip); DEBUGLOG(4, "ZSTD_compressEnd : cSize=%u", (unsigned)cSize); - FORWARD_IF_ERROR(cSize); + FORWARD_IF_ERROR(cSize, "ZSTD_compressEnd failed"); ip = iend; op += cSize; zcs->frameEnded = 1; @@ -3698,7 +3849,8 @@ static size_t ZSTD_compressStream_generic(ZSTD_CStream* zcs, zcs->inBuff + zcs->inBuffPos, toLoad, ip, iend-ip); zcs->inBuffPos += loaded; - ip += loaded; + if (loaded != 0) + ip += loaded; if ( (flushMode == ZSTD_e_continue) && (zcs->inBuffPos < zcs->inBuffTarget) ) { /* not enough input to fill full block : stop here */ @@ -3726,7 +3878,7 @@ static size_t ZSTD_compressStream_generic(ZSTD_CStream* zcs, zcs->inBuff + zcs->inToCompress, iSize) : ZSTD_compressContinue(zcs, cDst, oSize, zcs->inBuff + zcs->inToCompress, iSize); - FORWARD_IF_ERROR(cSize); + FORWARD_IF_ERROR(cSize, "%s", lastBlock ? "ZSTD_compressEnd failed" : "ZSTD_compressContinue failed"); zcs->frameEnded = lastBlock; /* prepare next block */ zcs->inBuffTarget = zcs->inBuffPos + zcs->blockSize; @@ -3758,7 +3910,8 @@ static size_t ZSTD_compressStream_generic(ZSTD_CStream* zcs, zcs->outBuff + zcs->outBuffFlushedSize, toFlush); DEBUGLOG(5, "toFlush: %u into %u ==> flushed: %u", (unsigned)toFlush, (unsigned)(oend-op), (unsigned)flushed); - op += flushed; + if (flushed) + op += flushed; zcs->outBuffFlushedSize += flushed; if (toFlush!=flushed) { /* flush not fully completed, presumably because dst is too small */ @@ -3802,7 +3955,7 @@ static size_t ZSTD_nextInputSizeHint_MTorST(const ZSTD_CCtx* cctx) size_t ZSTD_compressStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output, ZSTD_inBuffer* input) { - FORWARD_IF_ERROR( ZSTD_compressStream2(zcs, output, input, ZSTD_e_continue) ); + FORWARD_IF_ERROR( ZSTD_compressStream2(zcs, output, input, ZSTD_e_continue) , ""); return ZSTD_nextInputSizeHint_MTorST(zcs); } @@ -3814,15 +3967,15 @@ size_t ZSTD_compressStream2( ZSTD_CCtx* cctx, { DEBUGLOG(5, "ZSTD_compressStream2, endOp=%u ", (unsigned)endOp); /* check conditions */ - RETURN_ERROR_IF(output->pos > output->size, GENERIC); - RETURN_ERROR_IF(input->pos > input->size, GENERIC); + RETURN_ERROR_IF(output->pos > output->size, GENERIC, "invalid buffer"); + RETURN_ERROR_IF(input->pos > input->size, GENERIC, "invalid buffer"); assert(cctx!=NULL); /* transparent initialization stage */ if (cctx->streamStage == zcss_init) { ZSTD_CCtx_params params = cctx->requestedParams; ZSTD_prefixDict const prefixDict = cctx->prefixDict; - FORWARD_IF_ERROR( ZSTD_initLocalDict(cctx) ); /* Init the local dict if present. */ + FORWARD_IF_ERROR( ZSTD_initLocalDict(cctx) , ""); /* Init the local dict if present. */ memset(&cctx->prefixDict, 0, sizeof(cctx->prefixDict)); /* single usage */ assert(prefixDict.dict==NULL || cctx->cdict==NULL); /* only one can be set */ DEBUGLOG(4, "ZSTD_compressStream2 : transparent init stage"); @@ -3841,14 +3994,14 @@ size_t ZSTD_compressStream2( ZSTD_CCtx* cctx, DEBUGLOG(4, "ZSTD_compressStream2: creating new mtctx for nbWorkers=%u", params.nbWorkers); cctx->mtctx = ZSTDMT_createCCtx_advanced((U32)params.nbWorkers, cctx->customMem); - RETURN_ERROR_IF(cctx->mtctx == NULL, memory_allocation); + RETURN_ERROR_IF(cctx->mtctx == NULL, memory_allocation, "NULL pointer!"); } /* mt compression */ DEBUGLOG(4, "call ZSTDMT_initCStream_internal as nbWorkers=%u", params.nbWorkers); FORWARD_IF_ERROR( ZSTDMT_initCStream_internal( cctx->mtctx, - prefixDict.dict, prefixDict.dictSize, ZSTD_dct_rawContent, - cctx->cdict, params, cctx->pledgedSrcSizePlusOne-1) ); + prefixDict.dict, prefixDict.dictSize, prefixDict.dictContentType, + cctx->cdict, params, cctx->pledgedSrcSizePlusOne-1) , ""); cctx->streamStage = zcss_load; cctx->appliedParams.nbWorkers = params.nbWorkers; } else @@ -3856,7 +4009,7 @@ size_t ZSTD_compressStream2( ZSTD_CCtx* cctx, { FORWARD_IF_ERROR( ZSTD_resetCStream_internal(cctx, prefixDict.dict, prefixDict.dictSize, prefixDict.dictContentType, cctx->cdict, - params, cctx->pledgedSrcSizePlusOne-1) ); + params, cctx->pledgedSrcSizePlusOne-1) , ""); assert(cctx->streamStage == zcss_load); assert(cctx->appliedParams.nbWorkers == 0); } } @@ -3878,7 +4031,7 @@ size_t ZSTD_compressStream2( ZSTD_CCtx* cctx, || (endOp == ZSTD_e_end && flushMin == 0) ) { /* compression completed */ ZSTD_CCtx_reset(cctx, ZSTD_reset_session_only); } - FORWARD_IF_ERROR(flushMin); + FORWARD_IF_ERROR(flushMin, "ZSTDMT_compressStream_generic failed"); } while (forceMaxProgress && flushMin != 0 && output->pos < output->size); DEBUGLOG(5, "completed ZSTD_compressStream2 delegating to ZSTDMT_compressStream_generic"); /* Either we don't require maximum forward progress, we've finished the @@ -3888,7 +4041,7 @@ size_t ZSTD_compressStream2( ZSTD_CCtx* cctx, return flushMin; } #endif - FORWARD_IF_ERROR( ZSTD_compressStream_generic(cctx, output, input, endOp) ); + FORWARD_IF_ERROR( ZSTD_compressStream_generic(cctx, output, input, endOp) , ""); DEBUGLOG(5, "completed ZSTD_compressStream2"); return cctx->outBuffContentSize - cctx->outBuffFlushedSize; /* remaining to flush */ } @@ -3912,6 +4065,7 @@ size_t ZSTD_compress2(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize) { + DEBUGLOG(4, "ZSTD_compress2 (srcSize=%u)", (unsigned)srcSize); ZSTD_CCtx_reset(cctx, ZSTD_reset_session_only); { size_t oPos = 0; size_t iPos = 0; @@ -3919,10 +4073,10 @@ size_t ZSTD_compress2(ZSTD_CCtx* cctx, dst, dstCapacity, &oPos, src, srcSize, &iPos, ZSTD_e_end); - FORWARD_IF_ERROR(result); + FORWARD_IF_ERROR(result, "ZSTD_compressStream2_simpleArgs failed"); if (result != 0) { /* compression not completed, due to lack of output space */ assert(oPos == dstCapacity); - RETURN_ERROR(dstSize_tooSmall); + RETURN_ERROR(dstSize_tooSmall, ""); } assert(iPos == srcSize); /* all input is expected consumed */ return oPos; @@ -3944,7 +4098,7 @@ size_t ZSTD_endStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output) { ZSTD_inBuffer input = { NULL, 0, 0 }; size_t const remainingToFlush = ZSTD_compressStream2(zcs, output, &input, ZSTD_e_end); - FORWARD_IF_ERROR( remainingToFlush ); + FORWARD_IF_ERROR( remainingToFlush , "ZSTD_compressStream2 failed"); if (zcs->appliedParams.nbWorkers > 0) return remainingToFlush; /* minimal estimation */ /* single thread mode : attempt to calculate remaining to flush more precisely */ { size_t const lastBlockSize = zcs->frameEnded ? 0 : ZSTD_BLOCKHEADERSIZE; @@ -4069,35 +4223,56 @@ static const ZSTD_compressionParameters ZSTD_defaultCParameters[4][ZSTD_MAX_CLEV }, }; -/*! ZSTD_getCParams() : +/*! ZSTD_getCParams_internal() : * @return ZSTD_compressionParameters structure for a selected compression level, srcSize and dictSize. - * Size values are optional, provide 0 if not known or unused */ -ZSTD_compressionParameters ZSTD_getCParams(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize) + * Note: srcSizeHint 0 means 0, use ZSTD_CONTENTSIZE_UNKNOWN for unknown. + * Use dictSize == 0 for unknown or unused. */ +static ZSTD_compressionParameters ZSTD_getCParams_internal(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize) { - size_t const addedSize = srcSizeHint ? 0 : 500; - U64 const rSize = srcSizeHint+dictSize ? srcSizeHint+dictSize+addedSize : ZSTD_CONTENTSIZE_UNKNOWN; /* intentional overflow for srcSizeHint == ZSTD_CONTENTSIZE_UNKNOWN */ + int const unknown = srcSizeHint == ZSTD_CONTENTSIZE_UNKNOWN; + size_t const addedSize = unknown && dictSize > 0 ? 500 : 0; + U64 const rSize = unknown && dictSize == 0 ? ZSTD_CONTENTSIZE_UNKNOWN : srcSizeHint+dictSize+addedSize; U32 const tableID = (rSize <= 256 KB) + (rSize <= 128 KB) + (rSize <= 16 KB); int row = compressionLevel; - DEBUGLOG(5, "ZSTD_getCParams (cLevel=%i)", compressionLevel); + DEBUGLOG(5, "ZSTD_getCParams_internal (cLevel=%i)", compressionLevel); if (compressionLevel == 0) row = ZSTD_CLEVEL_DEFAULT; /* 0 == default */ if (compressionLevel < 0) row = 0; /* entry 0 is baseline for fast mode */ if (compressionLevel > ZSTD_MAX_CLEVEL) row = ZSTD_MAX_CLEVEL; { ZSTD_compressionParameters cp = ZSTD_defaultCParameters[tableID][row]; if (compressionLevel < 0) cp.targetLength = (unsigned)(-compressionLevel); /* acceleration factor */ - return ZSTD_adjustCParams_internal(cp, srcSizeHint, dictSize); /* refine parameters based on srcSize & dictSize */ + /* refine parameters based on srcSize & dictSize */ + return ZSTD_adjustCParams_internal(cp, srcSizeHint, dictSize); } } +/*! ZSTD_getCParams() : + * @return ZSTD_compressionParameters structure for a selected compression level, srcSize and dictSize. + * Size values are optional, provide 0 if not known or unused */ +ZSTD_compressionParameters ZSTD_getCParams(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize) +{ + if (srcSizeHint == 0) srcSizeHint = ZSTD_CONTENTSIZE_UNKNOWN; + return ZSTD_getCParams_internal(compressionLevel, srcSizeHint, dictSize); +} + /*! ZSTD_getParams() : * same idea as ZSTD_getCParams() * @return a `ZSTD_parameters` structure (instead of `ZSTD_compressionParameters`). * Fields of `ZSTD_frameParameters` are set to default values */ -ZSTD_parameters ZSTD_getParams(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize) { +static ZSTD_parameters ZSTD_getParams_internal(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize) { ZSTD_parameters params; - ZSTD_compressionParameters const cParams = ZSTD_getCParams(compressionLevel, srcSizeHint, dictSize); + ZSTD_compressionParameters const cParams = ZSTD_getCParams_internal(compressionLevel, srcSizeHint, dictSize); DEBUGLOG(5, "ZSTD_getParams (cLevel=%i)", compressionLevel); memset(¶ms, 0, sizeof(params)); params.cParams = cParams; params.fParams.contentSizeFlag = 1; return params; } + +/*! ZSTD_getParams() : + * same idea as ZSTD_getCParams() + * @return a `ZSTD_parameters` structure (instead of `ZSTD_compressionParameters`). + * Fields of `ZSTD_frameParameters` are set to default values */ +ZSTD_parameters ZSTD_getParams(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize) { + if (srcSizeHint == 0) srcSizeHint = ZSTD_CONTENTSIZE_UNKNOWN; + return ZSTD_getParams_internal(compressionLevel, srcSizeHint, dictSize); +} diff --git a/thirdparty/zstd/compress/zstd_compress_internal.h b/thirdparty/zstd/compress/zstd_compress_internal.h index 14036f873f..db73f6ce21 100644 --- a/thirdparty/zstd/compress/zstd_compress_internal.h +++ b/thirdparty/zstd/compress/zstd_compress_internal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -18,7 +18,7 @@ /*-************************************* * Dependencies ***************************************/ -#include "zstd_internal.h" +#include "../common/zstd_internal.h" #include "zstd_cwksp.h" #ifdef ZSTD_MULTITHREAD # include "zstdmt_compress.h" @@ -166,6 +166,7 @@ typedef struct { typedef struct { ZSTD_window_t window; /* State for the window round buffer management */ ldmEntry_t* hashTable; + U32 loadedDictEnd; BYTE* bucketOffsets; /* Next position in bucket to insert entry */ U64 hashPower; /* Used to compute the rolling hash. * Depends on ldmParams.minMatchLength */ @@ -249,6 +250,7 @@ struct ZSTD_CCtx_s { size_t staticSize; SeqCollector seqCollector; int isFirstBlock; + int initialized; seqStore_t seqStore; /* sequences storage ptrs */ ldmState_t ldmState; /* long distance matching state */ @@ -324,6 +326,31 @@ MEM_STATIC U32 ZSTD_MLcode(U32 mlBase) return (mlBase > 127) ? ZSTD_highbit32(mlBase) + ML_deltaCode : ML_Code[mlBase]; } +typedef struct repcodes_s { + U32 rep[3]; +} repcodes_t; + +MEM_STATIC repcodes_t ZSTD_updateRep(U32 const rep[3], U32 const offset, U32 const ll0) +{ + repcodes_t newReps; + if (offset >= ZSTD_REP_NUM) { /* full offset */ + newReps.rep[2] = rep[1]; + newReps.rep[1] = rep[0]; + newReps.rep[0] = offset - ZSTD_REP_MOVE; + } else { /* repcode */ + U32 const repCode = offset + ll0; + if (repCode > 0) { /* note : if repCode==0, no change */ + U32 const currentOffset = (repCode==ZSTD_REP_NUM) ? (rep[0] - 1) : rep[repCode]; + newReps.rep[2] = (repCode >= 2) ? rep[1] : rep[2]; + newReps.rep[1] = rep[0]; + newReps.rep[0] = currentOffset; + } else { /* repCode == 0 */ + memcpy(&newReps, rep, sizeof(newReps)); + } + } + return newReps; +} + /* ZSTD_cParam_withinBounds: * @return 1 if value is within cParam bounds, * 0 otherwise */ @@ -336,6 +363,30 @@ MEM_STATIC int ZSTD_cParam_withinBounds(ZSTD_cParameter cParam, int value) return 1; } +/* ZSTD_noCompressBlock() : + * Writes uncompressed block to dst buffer from given src. + * Returns the size of the block */ +MEM_STATIC size_t ZSTD_noCompressBlock (void* dst, size_t dstCapacity, const void* src, size_t srcSize, U32 lastBlock) +{ + U32 const cBlockHeader24 = lastBlock + (((U32)bt_raw)<<1) + (U32)(srcSize << 3); + RETURN_ERROR_IF(srcSize + ZSTD_blockHeaderSize > dstCapacity, + dstSize_tooSmall, "dst buf too small for uncompressed block"); + MEM_writeLE24(dst, cBlockHeader24); + memcpy((BYTE*)dst + ZSTD_blockHeaderSize, src, srcSize); + return ZSTD_blockHeaderSize + srcSize; +} + +MEM_STATIC size_t ZSTD_rleCompressBlock (void* dst, size_t dstCapacity, BYTE src, size_t srcSize, U32 lastBlock) +{ + BYTE* const op = (BYTE*)dst; + U32 const cBlockHeader = lastBlock + (((U32)bt_rle)<<1) + (U32)(srcSize << 3); + RETURN_ERROR_IF(dstCapacity < 4, dstSize_tooSmall, ""); + MEM_writeLE24(op, cBlockHeader); + op[3] = src; + return 4; +} + + /* ZSTD_minGain() : * minimum compression required * to generate a compress block or a compressed literals section. @@ -348,6 +399,21 @@ MEM_STATIC size_t ZSTD_minGain(size_t srcSize, ZSTD_strategy strat) return (srcSize >> minlog) + 2; } +MEM_STATIC int ZSTD_disableLiteralsCompression(const ZSTD_CCtx_params* cctxParams) +{ + switch (cctxParams->literalCompressionMode) { + case ZSTD_lcm_huffman: + return 0; + case ZSTD_lcm_uncompressed: + return 1; + default: + assert(0 /* impossible: pre-validated */); + /* fall-through */ + case ZSTD_lcm_auto: + return (cctxParams->cParams.strategy == ZSTD_fast) && (cctxParams->cParams.targetLength > 0); + } +} + /*! ZSTD_safecopyLiterals() : * memcpy() function that won't read beyond more than WILDCOPY_OVERLENGTH bytes past ilimit_w. * Only called when the sequence ends past ilimit_w, so it only needs to be optimized for single @@ -433,8 +499,7 @@ static unsigned ZSTD_NbCommonBytes (size_t val) if (MEM_64bits()) { # if defined(_MSC_VER) && defined(_WIN64) unsigned long r = 0; - _BitScanForward64( &r, (U64)val ); - return (unsigned)(r>>3); + return _BitScanForward64( &r, (U64)val ) ? (unsigned)(r >> 3) : 0; # elif defined(__GNUC__) && (__GNUC__ >= 4) return (__builtin_ctzll((U64)val) >> 3); # else @@ -451,8 +516,7 @@ static unsigned ZSTD_NbCommonBytes (size_t val) } else { /* 32 bits */ # if defined(_MSC_VER) unsigned long r=0; - _BitScanForward( &r, (U32)val ); - return (unsigned)(r>>3); + return _BitScanForward( &r, (U32)val ) ? (unsigned)(r >> 3) : 0; # elif defined(__GNUC__) && (__GNUC__ >= 3) return (__builtin_ctz((U32)val) >> 3); # else @@ -467,8 +531,7 @@ static unsigned ZSTD_NbCommonBytes (size_t val) if (MEM_64bits()) { # if defined(_MSC_VER) && defined(_WIN64) unsigned long r = 0; - _BitScanReverse64( &r, val ); - return (unsigned)(r>>3); + return _BitScanReverse64( &r, val ) ? (unsigned)(r >> 3) : 0; # elif defined(__GNUC__) && (__GNUC__ >= 4) return (__builtin_clzll(val) >> 3); # else @@ -482,8 +545,7 @@ static unsigned ZSTD_NbCommonBytes (size_t val) } else { /* 32 bits */ # if defined(_MSC_VER) unsigned long r = 0; - _BitScanReverse( &r, (unsigned long)val ); - return (unsigned)(r>>3); + return _BitScanReverse( &r, (unsigned long)val ) ? (unsigned)(r >> 3) : 0; # elif defined(__GNUC__) && (__GNUC__ >= 3) return (__builtin_clz((U32)val) >> 3); # else @@ -730,7 +792,10 @@ MEM_STATIC U32 ZSTD_window_correctOverflow(ZSTD_window_t* window, U32 cycleLog, */ U32 const cycleMask = (1U << cycleLog) - 1; U32 const current = (U32)((BYTE const*)src - window->base); - U32 const newCurrent = (current & cycleMask) + maxDist; + U32 const currentCycle0 = current & cycleMask; + /* Exclude zero so that newCurrent - maxDist >= 1. */ + U32 const currentCycle1 = currentCycle0 == 0 ? (1U << cycleLog) : currentCycle0; + U32 const newCurrent = currentCycle1 + maxDist; U32 const correction = current - newCurrent; assert((maxDist & cycleMask) == 0); assert(current > newCurrent); @@ -739,8 +804,17 @@ MEM_STATIC U32 ZSTD_window_correctOverflow(ZSTD_window_t* window, U32 cycleLog, window->base += correction; window->dictBase += correction; - window->lowLimit -= correction; - window->dictLimit -= correction; + if (window->lowLimit <= correction) window->lowLimit = 1; + else window->lowLimit -= correction; + if (window->dictLimit <= correction) window->dictLimit = 1; + else window->dictLimit -= correction; + + /* Ensure we can still reference the full window. */ + assert(newCurrent >= maxDist); + assert(newCurrent - maxDist >= 1); + /* Ensure that lowLimit and dictLimit didn't underflow. */ + assert(window->lowLimit <= newCurrent); + assert(window->dictLimit <= newCurrent); DEBUGLOG(4, "Correction of 0x%x bytes to lowLimit=0x%x", correction, window->lowLimit); @@ -844,6 +918,15 @@ ZSTD_checkDictValidity(const ZSTD_window_t* window, } } } } +MEM_STATIC void ZSTD_window_init(ZSTD_window_t* window) { + memset(window, 0, sizeof(*window)); + window->base = (BYTE const*)""; + window->dictBase = (BYTE const*)""; + window->dictLimit = 1; /* start from 1, so that 1st position is valid */ + window->lowLimit = 1; /* it ensures first and later CCtx usages compress the same */ + window->nextSrc = window->base + 1; /* see issue #1241 */ +} + /** * ZSTD_window_update(): * Updates the window by appending [src, src + srcSize) to the window. @@ -857,6 +940,10 @@ MEM_STATIC U32 ZSTD_window_update(ZSTD_window_t* window, BYTE const* const ip = (BYTE const*)src; U32 contiguous = 1; DEBUGLOG(5, "ZSTD_window_update"); + if (srcSize == 0) + return contiguous; + assert(window->base != NULL); + assert(window->dictBase != NULL); /* Check if blocks follow each other */ if (src != window->nextSrc) { /* not contiguous */ @@ -867,7 +954,7 @@ MEM_STATIC U32 ZSTD_window_update(ZSTD_window_t* window, window->dictLimit = (U32)distanceFromBase; window->dictBase = window->base; window->base = ip - distanceFromBase; - // ms->nextToUpdate = window->dictLimit; + /* ms->nextToUpdate = window->dictLimit; */ if (window->dictLimit - window->lowLimit < HASH_READ_SIZE) window->lowLimit = window->dictLimit; /* too small extDict */ contiguous = 0; } @@ -883,6 +970,9 @@ MEM_STATIC U32 ZSTD_window_update(ZSTD_window_t* window, return contiguous; } +/** + * Returns the lowest allowed match index. It may either be in the ext-dict or the prefix. + */ MEM_STATIC U32 ZSTD_getLowestMatchIndex(const ZSTD_matchState_t* ms, U32 current, unsigned windowLog) { U32 const maxDistance = 1U << windowLog; @@ -893,6 +983,19 @@ MEM_STATIC U32 ZSTD_getLowestMatchIndex(const ZSTD_matchState_t* ms, U32 current return matchLowest; } +/** + * Returns the lowest allowed match index in the prefix. + */ +MEM_STATIC U32 ZSTD_getLowestPrefixIndex(const ZSTD_matchState_t* ms, U32 current, unsigned windowLog) +{ + U32 const maxDistance = 1U << windowLog; + U32 const lowestValid = ms->window.dictLimit; + U32 const withinWindow = (current - lowestValid > maxDistance) ? current - maxDistance : lowestValid; + U32 const isDictionary = (ms->loadedDictEnd != 0); + U32 const matchLowest = isDictionary ? lowestValid : withinWindow; + return matchLowest; +} + /* debug functions */ @@ -931,6 +1034,21 @@ MEM_STATIC void ZSTD_debugTable(const U32* table, U32 max) } #endif +/* =============================================================== + * Shared internal declarations + * These prototypes may be called from sources not in lib/compress + * =============================================================== */ + +/* ZSTD_loadCEntropy() : + * dict : must point at beginning of a valid zstd dictionary. + * return : size of dictionary header (size of magic number + dict ID + entropy tables) + * assumptions : magic number supposed already checked + * and dictSize >= 8 */ +size_t ZSTD_loadCEntropy(ZSTD_compressedBlockState_t* bs, void* workspace, + short* offcodeNCount, unsigned* offcodeMaxValue, + const void* const dict, size_t dictSize); + +void ZSTD_reset_compressedBlockState(ZSTD_compressedBlockState_t* bs); /* ============================================================== * Private declarations @@ -940,6 +1058,7 @@ MEM_STATIC void ZSTD_debugTable(const U32* table, U32 max) /* ZSTD_getCParamsFromCCtxParams() : * cParams are built depending on compressionLevel, src size hints, * LDM and manually set compression parameters. + * Note: srcSizeHint == 0 means 0! */ ZSTD_compressionParameters ZSTD_getCParamsFromCCtxParams( const ZSTD_CCtx_params* CCtxParams, U64 srcSizeHint, size_t dictSize); @@ -999,5 +1118,8 @@ size_t ZSTD_writeLastEmptyBlock(void* dst, size_t dstCapacity); */ size_t ZSTD_referenceExternalSequences(ZSTD_CCtx* cctx, rawSeq* seq, size_t nbSeq); +/** ZSTD_cycleLog() : + * condition for correct operation : hashLog > 1 */ +U32 ZSTD_cycleLog(U32 hashLog, ZSTD_strategy strat); #endif /* ZSTD_COMPRESS_H */ diff --git a/thirdparty/zstd/compress/zstd_compress_literals.c b/thirdparty/zstd/compress/zstd_compress_literals.c index 6c13331182..17e7168d89 100644 --- a/thirdparty/zstd/compress/zstd_compress_literals.c +++ b/thirdparty/zstd/compress/zstd_compress_literals.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -18,7 +18,7 @@ size_t ZSTD_noCompressLiterals (void* dst, size_t dstCapacity, const void* src, BYTE* const ostart = (BYTE* const)dst; U32 const flSize = 1 + (srcSize>31) + (srcSize>4095); - RETURN_ERROR_IF(srcSize + flSize > dstCapacity, dstSize_tooSmall); + RETURN_ERROR_IF(srcSize + flSize > dstCapacity, dstSize_tooSmall, ""); switch(flSize) { @@ -36,6 +36,7 @@ size_t ZSTD_noCompressLiterals (void* dst, size_t dstCapacity, const void* src, } memcpy(ostart + flSize, src, srcSize); + DEBUGLOG(5, "Raw literals: %u -> %u", (U32)srcSize, (U32)(srcSize + flSize)); return srcSize + flSize; } @@ -62,6 +63,7 @@ size_t ZSTD_compressRleLiteralsBlock (void* dst, size_t dstCapacity, const void* } ostart[flSize] = *(const BYTE*)src; + DEBUGLOG(5, "RLE literals: %u -> %u", (U32)srcSize, (U32)flSize + 1); return flSize+1; } @@ -80,8 +82,8 @@ size_t ZSTD_compressLiterals (ZSTD_hufCTables_t const* prevHuf, symbolEncodingType_e hType = set_compressed; size_t cLitSize; - DEBUGLOG(5,"ZSTD_compressLiterals (disableLiteralCompression=%i)", - disableLiteralCompression); + DEBUGLOG(5,"ZSTD_compressLiterals (disableLiteralCompression=%i srcSize=%u)", + disableLiteralCompression, (U32)srcSize); /* Prepare nextEntropy assuming reusing the existing table */ memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); @@ -102,14 +104,15 @@ size_t ZSTD_compressLiterals (ZSTD_hufCTables_t const* prevHuf, cLitSize = singleStream ? HUF_compress1X_repeat( ostart+lhSize, dstCapacity-lhSize, src, srcSize, - 255, 11, entropyWorkspace, entropyWorkspaceSize, + HUF_SYMBOLVALUE_MAX, HUF_TABLELOG_DEFAULT, entropyWorkspace, entropyWorkspaceSize, (HUF_CElt*)nextHuf->CTable, &repeat, preferRepeat, bmi2) : HUF_compress4X_repeat( ostart+lhSize, dstCapacity-lhSize, src, srcSize, - 255, 11, entropyWorkspace, entropyWorkspaceSize, + HUF_SYMBOLVALUE_MAX, HUF_TABLELOG_DEFAULT, entropyWorkspace, entropyWorkspaceSize, (HUF_CElt*)nextHuf->CTable, &repeat, preferRepeat, bmi2); if (repeat != HUF_repeat_none) { /* reused the existing table */ + DEBUGLOG(5, "Reusing previous huffman table"); hType = set_repeat; } } @@ -150,5 +153,6 @@ size_t ZSTD_compressLiterals (ZSTD_hufCTables_t const* prevHuf, default: /* not possible : lhSize is {3,4,5} */ assert(0); } + DEBUGLOG(5, "Compressed literals: %u -> %u", (U32)srcSize, (U32)(lhSize+cLitSize)); return lhSize+cLitSize; } diff --git a/thirdparty/zstd/compress/zstd_compress_literals.h b/thirdparty/zstd/compress/zstd_compress_literals.h index 97273d7cfd..8b08705743 100644 --- a/thirdparty/zstd/compress/zstd_compress_literals.h +++ b/thirdparty/zstd/compress/zstd_compress_literals.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the diff --git a/thirdparty/zstd/compress/zstd_compress_sequences.c b/thirdparty/zstd/compress/zstd_compress_sequences.c index 0ff7a26823..f9f8097c83 100644 --- a/thirdparty/zstd/compress/zstd_compress_sequences.c +++ b/thirdparty/zstd/compress/zstd_compress_sequences.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -60,7 +60,7 @@ static size_t ZSTD_NCountCost(unsigned const* count, unsigned const max, BYTE wksp[FSE_NCOUNTBOUND]; S16 norm[MaxSeq + 1]; const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); - FORWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq, max)); + FORWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq, max), ""); return FSE_writeNCount(wksp, sizeof(wksp), norm, max, tableLog); } @@ -86,7 +86,7 @@ static size_t ZSTD_entropyCost(unsigned const* count, unsigned const max, size_t * Returns the cost in bits of encoding the distribution in count using ctable. * Returns an error if ctable cannot represent all the symbols in count. */ -static size_t ZSTD_fseBitCost( +size_t ZSTD_fseBitCost( FSE_CTable const* ctable, unsigned const* count, unsigned const max) @@ -96,18 +96,22 @@ static size_t ZSTD_fseBitCost( unsigned s; FSE_CState_t cstate; FSE_initCState(&cstate, ctable); - RETURN_ERROR_IF(ZSTD_getFSEMaxSymbolValue(ctable) < max, GENERIC, - "Repeat FSE_CTable has maxSymbolValue %u < %u", + if (ZSTD_getFSEMaxSymbolValue(ctable) < max) { + DEBUGLOG(5, "Repeat FSE_CTable has maxSymbolValue %u < %u", ZSTD_getFSEMaxSymbolValue(ctable), max); + return ERROR(GENERIC); + } for (s = 0; s <= max; ++s) { unsigned const tableLog = cstate.stateLog; unsigned const badCost = (tableLog + 1) << kAccuracyLog; unsigned const bitCost = FSE_bitCost(cstate.symbolTT, tableLog, s, kAccuracyLog); if (count[s] == 0) continue; - RETURN_ERROR_IF(bitCost >= badCost, GENERIC, - "Repeat FSE_CTable has Prob[%u] == 0", s); - cost += count[s] * bitCost; + if (bitCost >= badCost) { + DEBUGLOG(5, "Repeat FSE_CTable has Prob[%u] == 0", s); + return ERROR(GENERIC); + } + cost += (size_t)count[s] * bitCost; } return cost >> kAccuracyLog; } @@ -117,15 +121,15 @@ static size_t ZSTD_fseBitCost( * table described by norm. The max symbol support by norm is assumed >= max. * norm must be valid for every symbol with non-zero probability in count. */ -static size_t ZSTD_crossEntropyCost(short const* norm, unsigned accuracyLog, - unsigned const* count, unsigned const max) +size_t ZSTD_crossEntropyCost(short const* norm, unsigned accuracyLog, + unsigned const* count, unsigned const max) { unsigned const shift = 8 - accuracyLog; size_t cost = 0; unsigned s; assert(accuracyLog <= 8); for (s = 0; s <= max; ++s) { - unsigned const normAcc = norm[s] != -1 ? norm[s] : 1; + unsigned const normAcc = (norm[s] != -1) ? (unsigned)norm[s] : 1; unsigned const norm256 = normAcc << shift; assert(norm256 > 0); assert(norm256 < 256); @@ -230,15 +234,15 @@ ZSTD_buildCTable(void* dst, size_t dstCapacity, switch (type) { case set_rle: - FORWARD_IF_ERROR(FSE_buildCTable_rle(nextCTable, (BYTE)max)); - RETURN_ERROR_IF(dstCapacity==0, dstSize_tooSmall); + FORWARD_IF_ERROR(FSE_buildCTable_rle(nextCTable, (BYTE)max), ""); + RETURN_ERROR_IF(dstCapacity==0, dstSize_tooSmall, "not enough space"); *op = codeTable[0]; return 1; case set_repeat: memcpy(nextCTable, prevCTable, prevCTableSize); return 0; case set_basic: - FORWARD_IF_ERROR(FSE_buildCTable_wksp(nextCTable, defaultNorm, defaultMax, defaultNormLog, entropyWorkspace, entropyWorkspaceSize)); /* note : could be pre-calculated */ + FORWARD_IF_ERROR(FSE_buildCTable_wksp(nextCTable, defaultNorm, defaultMax, defaultNormLog, entropyWorkspace, entropyWorkspaceSize), ""); /* note : could be pre-calculated */ return 0; case set_compressed: { S16 norm[MaxSeq + 1]; @@ -249,14 +253,14 @@ ZSTD_buildCTable(void* dst, size_t dstCapacity, nbSeq_1--; } assert(nbSeq_1 > 1); - FORWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq_1, max)); + FORWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq_1, max), ""); { size_t const NCountSize = FSE_writeNCount(op, oend - op, norm, max, tableLog); /* overflow protected */ - FORWARD_IF_ERROR(NCountSize); - FORWARD_IF_ERROR(FSE_buildCTable_wksp(nextCTable, norm, max, tableLog, entropyWorkspace, entropyWorkspaceSize)); + FORWARD_IF_ERROR(NCountSize, "FSE_writeNCount failed"); + FORWARD_IF_ERROR(FSE_buildCTable_wksp(nextCTable, norm, max, tableLog, entropyWorkspace, entropyWorkspaceSize), ""); return NCountSize; } } - default: assert(0); RETURN_ERROR(GENERIC); + default: assert(0); RETURN_ERROR(GENERIC, "impossible to reach"); } } @@ -290,7 +294,7 @@ ZSTD_encodeSequences_body( if (MEM_32bits()) BIT_flushBits(&blockStream); if (longOffsets) { U32 const ofBits = ofCodeTable[nbSeq-1]; - int const extraBits = ofBits - MIN(ofBits, STREAM_ACCUMULATOR_MIN-1); + unsigned const extraBits = ofBits - MIN(ofBits, STREAM_ACCUMULATOR_MIN-1); if (extraBits) { BIT_addBits(&blockStream, sequences[nbSeq-1].offset, extraBits); BIT_flushBits(&blockStream); @@ -327,7 +331,7 @@ ZSTD_encodeSequences_body( BIT_addBits(&blockStream, sequences[n].matchLength, mlBits); if (MEM_32bits() || (ofBits+mlBits+llBits > 56)) BIT_flushBits(&blockStream); if (longOffsets) { - int const extraBits = ofBits - MIN(ofBits, STREAM_ACCUMULATOR_MIN-1); + unsigned const extraBits = ofBits - MIN(ofBits, STREAM_ACCUMULATOR_MIN-1); if (extraBits) { BIT_addBits(&blockStream, sequences[n].offset, extraBits); BIT_flushBits(&blockStream); /* (7)*/ diff --git a/thirdparty/zstd/compress/zstd_compress_sequences.h b/thirdparty/zstd/compress/zstd_compress_sequences.h index 57e8e367b0..68c6f9a5ac 100644 --- a/thirdparty/zstd/compress/zstd_compress_sequences.h +++ b/thirdparty/zstd/compress/zstd_compress_sequences.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -11,8 +11,8 @@ #ifndef ZSTD_COMPRESS_SEQUENCES_H #define ZSTD_COMPRESS_SEQUENCES_H -#include "fse.h" /* FSE_repeat, FSE_CTable */ -#include "zstd_internal.h" /* symbolEncodingType_e, ZSTD_strategy */ +#include "../common/fse.h" /* FSE_repeat, FSE_CTable */ +#include "../common/zstd_internal.h" /* symbolEncodingType_e, ZSTD_strategy */ typedef enum { ZSTD_defaultDisallowed = 0, @@ -44,4 +44,11 @@ size_t ZSTD_encodeSequences( FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable, seqDef const* sequences, size_t nbSeq, int longOffsets, int bmi2); +size_t ZSTD_fseBitCost( + FSE_CTable const* ctable, + unsigned const* count, + unsigned const max); + +size_t ZSTD_crossEntropyCost(short const* norm, unsigned accuracyLog, + unsigned const* count, unsigned const max); #endif /* ZSTD_COMPRESS_SEQUENCES_H */ diff --git a/thirdparty/zstd/compress/zstd_compress_superblock.c b/thirdparty/zstd/compress/zstd_compress_superblock.c new file mode 100644 index 0000000000..b693866c0a --- /dev/null +++ b/thirdparty/zstd/compress/zstd_compress_superblock.c @@ -0,0 +1,845 @@ +/* + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + /*-************************************* + * Dependencies + ***************************************/ +#include "zstd_compress_superblock.h" + +#include "../common/zstd_internal.h" /* ZSTD_getSequenceLength */ +#include "hist.h" /* HIST_countFast_wksp */ +#include "zstd_compress_internal.h" +#include "zstd_compress_sequences.h" +#include "zstd_compress_literals.h" + +/*-************************************* +* Superblock entropy buffer structs +***************************************/ +/** ZSTD_hufCTablesMetadata_t : + * Stores Literals Block Type for a super-block in hType, and + * huffman tree description in hufDesBuffer. + * hufDesSize refers to the size of huffman tree description in bytes. + * This metadata is populated in ZSTD_buildSuperBlockEntropy_literal() */ +typedef struct { + symbolEncodingType_e hType; + BYTE hufDesBuffer[500]; /* TODO give name to this value */ + size_t hufDesSize; +} ZSTD_hufCTablesMetadata_t; + +/** ZSTD_fseCTablesMetadata_t : + * Stores symbol compression modes for a super-block in {ll, ol, ml}Type, and + * fse tables in fseTablesBuffer. + * fseTablesSize refers to the size of fse tables in bytes. + * This metadata is populated in ZSTD_buildSuperBlockEntropy_sequences() */ +typedef struct { + symbolEncodingType_e llType; + symbolEncodingType_e ofType; + symbolEncodingType_e mlType; + BYTE fseTablesBuffer[500]; /* TODO give name to this value */ + size_t fseTablesSize; + size_t lastCountSize; /* This is to account for bug in 1.3.4. More detail in ZSTD_compressSubBlock_sequences() */ +} ZSTD_fseCTablesMetadata_t; + +typedef struct { + ZSTD_hufCTablesMetadata_t hufMetadata; + ZSTD_fseCTablesMetadata_t fseMetadata; +} ZSTD_entropyCTablesMetadata_t; + + +/** ZSTD_buildSuperBlockEntropy_literal() : + * Builds entropy for the super-block literals. + * Stores literals block type (raw, rle, compressed, repeat) and + * huffman description table to hufMetadata. + * @return : size of huffman description table or error code */ +static size_t ZSTD_buildSuperBlockEntropy_literal(void* const src, size_t srcSize, + const ZSTD_hufCTables_t* prevHuf, + ZSTD_hufCTables_t* nextHuf, + ZSTD_hufCTablesMetadata_t* hufMetadata, + const int disableLiteralsCompression, + void* workspace, size_t wkspSize) +{ + BYTE* const wkspStart = (BYTE*)workspace; + BYTE* const wkspEnd = wkspStart + wkspSize; + BYTE* const countWkspStart = wkspStart; + unsigned* const countWksp = (unsigned*)workspace; + const size_t countWkspSize = (HUF_SYMBOLVALUE_MAX + 1) * sizeof(unsigned); + BYTE* const nodeWksp = countWkspStart + countWkspSize; + const size_t nodeWkspSize = wkspEnd-nodeWksp; + unsigned maxSymbolValue = 255; + unsigned huffLog = HUF_TABLELOG_DEFAULT; + HUF_repeat repeat = prevHuf->repeatMode; + + DEBUGLOG(5, "ZSTD_buildSuperBlockEntropy_literal (srcSize=%zu)", srcSize); + + /* Prepare nextEntropy assuming reusing the existing table */ + memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); + + if (disableLiteralsCompression) { + DEBUGLOG(5, "set_basic - disabled"); + hufMetadata->hType = set_basic; + return 0; + } + + /* small ? don't even attempt compression (speed opt) */ +# define COMPRESS_LITERALS_SIZE_MIN 63 + { size_t const minLitSize = (prevHuf->repeatMode == HUF_repeat_valid) ? 6 : COMPRESS_LITERALS_SIZE_MIN; + if (srcSize <= minLitSize) { + DEBUGLOG(5, "set_basic - too small"); + hufMetadata->hType = set_basic; + return 0; + } + } + + /* Scan input and build symbol stats */ + { size_t const largest = HIST_count_wksp (countWksp, &maxSymbolValue, (const BYTE*)src, srcSize, workspace, wkspSize); + FORWARD_IF_ERROR(largest, "HIST_count_wksp failed"); + if (largest == srcSize) { + DEBUGLOG(5, "set_rle"); + hufMetadata->hType = set_rle; + return 0; + } + if (largest <= (srcSize >> 7)+4) { + DEBUGLOG(5, "set_basic - no gain"); + hufMetadata->hType = set_basic; + return 0; + } + } + + /* Validate the previous Huffman table */ + if (repeat == HUF_repeat_check && !HUF_validateCTable((HUF_CElt const*)prevHuf->CTable, countWksp, maxSymbolValue)) { + repeat = HUF_repeat_none; + } + + /* Build Huffman Tree */ + memset(nextHuf->CTable, 0, sizeof(nextHuf->CTable)); + huffLog = HUF_optimalTableLog(huffLog, srcSize, maxSymbolValue); + { size_t const maxBits = HUF_buildCTable_wksp((HUF_CElt*)nextHuf->CTable, countWksp, + maxSymbolValue, huffLog, + nodeWksp, nodeWkspSize); + FORWARD_IF_ERROR(maxBits, "HUF_buildCTable_wksp"); + huffLog = (U32)maxBits; + { /* Build and write the CTable */ + size_t const newCSize = HUF_estimateCompressedSize( + (HUF_CElt*)nextHuf->CTable, countWksp, maxSymbolValue); + size_t const hSize = HUF_writeCTable( + hufMetadata->hufDesBuffer, sizeof(hufMetadata->hufDesBuffer), + (HUF_CElt*)nextHuf->CTable, maxSymbolValue, huffLog); + /* Check against repeating the previous CTable */ + if (repeat != HUF_repeat_none) { + size_t const oldCSize = HUF_estimateCompressedSize( + (HUF_CElt const*)prevHuf->CTable, countWksp, maxSymbolValue); + if (oldCSize < srcSize && (oldCSize <= hSize + newCSize || hSize + 12 >= srcSize)) { + DEBUGLOG(5, "set_repeat - smaller"); + memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); + hufMetadata->hType = set_repeat; + return 0; + } + } + if (newCSize + hSize >= srcSize) { + DEBUGLOG(5, "set_basic - no gains"); + memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); + hufMetadata->hType = set_basic; + return 0; + } + DEBUGLOG(5, "set_compressed (hSize=%u)", (U32)hSize); + hufMetadata->hType = set_compressed; + nextHuf->repeatMode = HUF_repeat_check; + return hSize; + } + } +} + +/** ZSTD_buildSuperBlockEntropy_sequences() : + * Builds entropy for the super-block sequences. + * Stores symbol compression modes and fse table to fseMetadata. + * @return : size of fse tables or error code */ +static size_t ZSTD_buildSuperBlockEntropy_sequences(seqStore_t* seqStorePtr, + const ZSTD_fseCTables_t* prevEntropy, + ZSTD_fseCTables_t* nextEntropy, + const ZSTD_CCtx_params* cctxParams, + ZSTD_fseCTablesMetadata_t* fseMetadata, + void* workspace, size_t wkspSize) +{ + BYTE* const wkspStart = (BYTE*)workspace; + BYTE* const wkspEnd = wkspStart + wkspSize; + BYTE* const countWkspStart = wkspStart; + unsigned* const countWksp = (unsigned*)workspace; + const size_t countWkspSize = (MaxSeq + 1) * sizeof(unsigned); + BYTE* const cTableWksp = countWkspStart + countWkspSize; + const size_t cTableWkspSize = wkspEnd-cTableWksp; + ZSTD_strategy const strategy = cctxParams->cParams.strategy; + FSE_CTable* CTable_LitLength = nextEntropy->litlengthCTable; + FSE_CTable* CTable_OffsetBits = nextEntropy->offcodeCTable; + FSE_CTable* CTable_MatchLength = nextEntropy->matchlengthCTable; + const BYTE* const ofCodeTable = seqStorePtr->ofCode; + const BYTE* const llCodeTable = seqStorePtr->llCode; + const BYTE* const mlCodeTable = seqStorePtr->mlCode; + size_t const nbSeq = seqStorePtr->sequences - seqStorePtr->sequencesStart; + BYTE* const ostart = fseMetadata->fseTablesBuffer; + BYTE* const oend = ostart + sizeof(fseMetadata->fseTablesBuffer); + BYTE* op = ostart; + + assert(cTableWkspSize >= (1 << MaxFSELog) * sizeof(FSE_FUNCTION_TYPE)); + DEBUGLOG(5, "ZSTD_buildSuperBlockEntropy_sequences (nbSeq=%zu)", nbSeq); + memset(workspace, 0, wkspSize); + + fseMetadata->lastCountSize = 0; + /* convert length/distances into codes */ + ZSTD_seqToCodes(seqStorePtr); + /* build CTable for Literal Lengths */ + { U32 LLtype; + unsigned max = MaxLL; + size_t const mostFrequent = HIST_countFast_wksp(countWksp, &max, llCodeTable, nbSeq, workspace, wkspSize); /* can't fail */ + DEBUGLOG(5, "Building LL table"); + nextEntropy->litlength_repeatMode = prevEntropy->litlength_repeatMode; + LLtype = ZSTD_selectEncodingType(&nextEntropy->litlength_repeatMode, + countWksp, max, mostFrequent, nbSeq, + LLFSELog, prevEntropy->litlengthCTable, + LL_defaultNorm, LL_defaultNormLog, + ZSTD_defaultAllowed, strategy); + assert(set_basic < set_compressed && set_rle < set_compressed); + assert(!(LLtype < set_compressed && nextEntropy->litlength_repeatMode != FSE_repeat_none)); /* We don't copy tables */ + { size_t const countSize = ZSTD_buildCTable(op, oend - op, CTable_LitLength, LLFSELog, (symbolEncodingType_e)LLtype, + countWksp, max, llCodeTable, nbSeq, LL_defaultNorm, LL_defaultNormLog, MaxLL, + prevEntropy->litlengthCTable, sizeof(prevEntropy->litlengthCTable), + cTableWksp, cTableWkspSize); + FORWARD_IF_ERROR(countSize, "ZSTD_buildCTable for LitLens failed"); + if (LLtype == set_compressed) + fseMetadata->lastCountSize = countSize; + op += countSize; + fseMetadata->llType = (symbolEncodingType_e) LLtype; + } } + /* build CTable for Offsets */ + { U32 Offtype; + unsigned max = MaxOff; + size_t const mostFrequent = HIST_countFast_wksp(countWksp, &max, ofCodeTable, nbSeq, workspace, wkspSize); /* can't fail */ + /* We can only use the basic table if max <= DefaultMaxOff, otherwise the offsets are too large */ + ZSTD_defaultPolicy_e const defaultPolicy = (max <= DefaultMaxOff) ? ZSTD_defaultAllowed : ZSTD_defaultDisallowed; + DEBUGLOG(5, "Building OF table"); + nextEntropy->offcode_repeatMode = prevEntropy->offcode_repeatMode; + Offtype = ZSTD_selectEncodingType(&nextEntropy->offcode_repeatMode, + countWksp, max, mostFrequent, nbSeq, + OffFSELog, prevEntropy->offcodeCTable, + OF_defaultNorm, OF_defaultNormLog, + defaultPolicy, strategy); + assert(!(Offtype < set_compressed && nextEntropy->offcode_repeatMode != FSE_repeat_none)); /* We don't copy tables */ + { size_t const countSize = ZSTD_buildCTable(op, oend - op, CTable_OffsetBits, OffFSELog, (symbolEncodingType_e)Offtype, + countWksp, max, ofCodeTable, nbSeq, OF_defaultNorm, OF_defaultNormLog, DefaultMaxOff, + prevEntropy->offcodeCTable, sizeof(prevEntropy->offcodeCTable), + cTableWksp, cTableWkspSize); + FORWARD_IF_ERROR(countSize, "ZSTD_buildCTable for Offsets failed"); + if (Offtype == set_compressed) + fseMetadata->lastCountSize = countSize; + op += countSize; + fseMetadata->ofType = (symbolEncodingType_e) Offtype; + } } + /* build CTable for MatchLengths */ + { U32 MLtype; + unsigned max = MaxML; + size_t const mostFrequent = HIST_countFast_wksp(countWksp, &max, mlCodeTable, nbSeq, workspace, wkspSize); /* can't fail */ + DEBUGLOG(5, "Building ML table (remaining space : %i)", (int)(oend-op)); + nextEntropy->matchlength_repeatMode = prevEntropy->matchlength_repeatMode; + MLtype = ZSTD_selectEncodingType(&nextEntropy->matchlength_repeatMode, + countWksp, max, mostFrequent, nbSeq, + MLFSELog, prevEntropy->matchlengthCTable, + ML_defaultNorm, ML_defaultNormLog, + ZSTD_defaultAllowed, strategy); + assert(!(MLtype < set_compressed && nextEntropy->matchlength_repeatMode != FSE_repeat_none)); /* We don't copy tables */ + { size_t const countSize = ZSTD_buildCTable(op, oend - op, CTable_MatchLength, MLFSELog, (symbolEncodingType_e)MLtype, + countWksp, max, mlCodeTable, nbSeq, ML_defaultNorm, ML_defaultNormLog, MaxML, + prevEntropy->matchlengthCTable, sizeof(prevEntropy->matchlengthCTable), + cTableWksp, cTableWkspSize); + FORWARD_IF_ERROR(countSize, "ZSTD_buildCTable for MatchLengths failed"); + if (MLtype == set_compressed) + fseMetadata->lastCountSize = countSize; + op += countSize; + fseMetadata->mlType = (symbolEncodingType_e) MLtype; + } } + assert((size_t) (op-ostart) <= sizeof(fseMetadata->fseTablesBuffer)); + return op-ostart; +} + + +/** ZSTD_buildSuperBlockEntropy() : + * Builds entropy for the super-block. + * @return : 0 on success or error code */ +static size_t +ZSTD_buildSuperBlockEntropy(seqStore_t* seqStorePtr, + const ZSTD_entropyCTables_t* prevEntropy, + ZSTD_entropyCTables_t* nextEntropy, + const ZSTD_CCtx_params* cctxParams, + ZSTD_entropyCTablesMetadata_t* entropyMetadata, + void* workspace, size_t wkspSize) +{ + size_t const litSize = seqStorePtr->lit - seqStorePtr->litStart; + DEBUGLOG(5, "ZSTD_buildSuperBlockEntropy"); + entropyMetadata->hufMetadata.hufDesSize = + ZSTD_buildSuperBlockEntropy_literal(seqStorePtr->litStart, litSize, + &prevEntropy->huf, &nextEntropy->huf, + &entropyMetadata->hufMetadata, + ZSTD_disableLiteralsCompression(cctxParams), + workspace, wkspSize); + FORWARD_IF_ERROR(entropyMetadata->hufMetadata.hufDesSize, "ZSTD_buildSuperBlockEntropy_literal failed"); + entropyMetadata->fseMetadata.fseTablesSize = + ZSTD_buildSuperBlockEntropy_sequences(seqStorePtr, + &prevEntropy->fse, &nextEntropy->fse, + cctxParams, + &entropyMetadata->fseMetadata, + workspace, wkspSize); + FORWARD_IF_ERROR(entropyMetadata->fseMetadata.fseTablesSize, "ZSTD_buildSuperBlockEntropy_sequences failed"); + return 0; +} + +/** ZSTD_compressSubBlock_literal() : + * Compresses literals section for a sub-block. + * When we have to write the Huffman table we will sometimes choose a header + * size larger than necessary. This is because we have to pick the header size + * before we know the table size + compressed size, so we have a bound on the + * table size. If we guessed incorrectly, we fall back to uncompressed literals. + * + * We write the header when writeEntropy=1 and set entropyWrriten=1 when we succeeded + * in writing the header, otherwise it is set to 0. + * + * hufMetadata->hType has literals block type info. + * If it is set_basic, all sub-blocks literals section will be Raw_Literals_Block. + * If it is set_rle, all sub-blocks literals section will be RLE_Literals_Block. + * If it is set_compressed, first sub-block's literals section will be Compressed_Literals_Block + * If it is set_compressed, first sub-block's literals section will be Treeless_Literals_Block + * and the following sub-blocks' literals sections will be Treeless_Literals_Block. + * @return : compressed size of literals section of a sub-block + * Or 0 if it unable to compress. + * Or error code */ +static size_t ZSTD_compressSubBlock_literal(const HUF_CElt* hufTable, + const ZSTD_hufCTablesMetadata_t* hufMetadata, + const BYTE* literals, size_t litSize, + void* dst, size_t dstSize, + const int bmi2, int writeEntropy, int* entropyWritten) +{ + size_t const header = writeEntropy ? 200 : 0; + size_t const lhSize = 3 + (litSize >= (1 KB - header)) + (litSize >= (16 KB - header)); + BYTE* const ostart = (BYTE*)dst; + BYTE* const oend = ostart + dstSize; + BYTE* op = ostart + lhSize; + U32 const singleStream = lhSize == 3; + symbolEncodingType_e hType = writeEntropy ? hufMetadata->hType : set_repeat; + size_t cLitSize = 0; + + (void)bmi2; /* TODO bmi2... */ + + DEBUGLOG(5, "ZSTD_compressSubBlock_literal (litSize=%zu, lhSize=%zu, writeEntropy=%d)", litSize, lhSize, writeEntropy); + + *entropyWritten = 0; + if (litSize == 0 || hufMetadata->hType == set_basic) { + DEBUGLOG(5, "ZSTD_compressSubBlock_literal using raw literal"); + return ZSTD_noCompressLiterals(dst, dstSize, literals, litSize); + } else if (hufMetadata->hType == set_rle) { + DEBUGLOG(5, "ZSTD_compressSubBlock_literal using rle literal"); + return ZSTD_compressRleLiteralsBlock(dst, dstSize, literals, litSize); + } + + assert(litSize > 0); + assert(hufMetadata->hType == set_compressed || hufMetadata->hType == set_repeat); + + if (writeEntropy && hufMetadata->hType == set_compressed) { + memcpy(op, hufMetadata->hufDesBuffer, hufMetadata->hufDesSize); + op += hufMetadata->hufDesSize; + cLitSize += hufMetadata->hufDesSize; + DEBUGLOG(5, "ZSTD_compressSubBlock_literal (hSize=%zu)", hufMetadata->hufDesSize); + } + + /* TODO bmi2 */ + { const size_t cSize = singleStream ? HUF_compress1X_usingCTable(op, oend-op, literals, litSize, hufTable) + : HUF_compress4X_usingCTable(op, oend-op, literals, litSize, hufTable); + op += cSize; + cLitSize += cSize; + if (cSize == 0 || ERR_isError(cSize)) { + DEBUGLOG(5, "Failed to write entropy tables %s", ZSTD_getErrorName(cSize)); + return 0; + } + /* If we expand and we aren't writing a header then emit uncompressed */ + if (!writeEntropy && cLitSize >= litSize) { + DEBUGLOG(5, "ZSTD_compressSubBlock_literal using raw literal because uncompressible"); + return ZSTD_noCompressLiterals(dst, dstSize, literals, litSize); + } + /* If we are writing headers then allow expansion that doesn't change our header size. */ + if (lhSize < (size_t)(3 + (cLitSize >= 1 KB) + (cLitSize >= 16 KB))) { + assert(cLitSize > litSize); + DEBUGLOG(5, "Literals expanded beyond allowed header size"); + return ZSTD_noCompressLiterals(dst, dstSize, literals, litSize); + } + DEBUGLOG(5, "ZSTD_compressSubBlock_literal (cSize=%zu)", cSize); + } + + /* Build header */ + switch(lhSize) + { + case 3: /* 2 - 2 - 10 - 10 */ + { U32 const lhc = hType + ((!singleStream) << 2) + ((U32)litSize<<4) + ((U32)cLitSize<<14); + MEM_writeLE24(ostart, lhc); + break; + } + case 4: /* 2 - 2 - 14 - 14 */ + { U32 const lhc = hType + (2 << 2) + ((U32)litSize<<4) + ((U32)cLitSize<<18); + MEM_writeLE32(ostart, lhc); + break; + } + case 5: /* 2 - 2 - 18 - 18 */ + { U32 const lhc = hType + (3 << 2) + ((U32)litSize<<4) + ((U32)cLitSize<<22); + MEM_writeLE32(ostart, lhc); + ostart[4] = (BYTE)(cLitSize >> 10); + break; + } + default: /* not possible : lhSize is {3,4,5} */ + assert(0); + } + *entropyWritten = 1; + DEBUGLOG(5, "Compressed literals: %u -> %u", (U32)litSize, (U32)(op-ostart)); + return op-ostart; +} + +static size_t ZSTD_seqDecompressedSize(seqStore_t const* seqStore, const seqDef* sequences, size_t nbSeq, size_t litSize, int lastSequence) { + const seqDef* const sstart = sequences; + const seqDef* const send = sequences + nbSeq; + const seqDef* sp = sstart; + size_t matchLengthSum = 0; + size_t litLengthSum = 0; + while (send-sp > 0) { + ZSTD_sequenceLength const seqLen = ZSTD_getSequenceLength(seqStore, sp); + litLengthSum += seqLen.litLength; + matchLengthSum += seqLen.matchLength; + sp++; + } + assert(litLengthSum <= litSize); + if (!lastSequence) { + assert(litLengthSum == litSize); + } + return matchLengthSum + litSize; +} + +/** ZSTD_compressSubBlock_sequences() : + * Compresses sequences section for a sub-block. + * fseMetadata->llType, fseMetadata->ofType, and fseMetadata->mlType have + * symbol compression modes for the super-block. + * The first successfully compressed block will have these in its header. + * We set entropyWritten=1 when we succeed in compressing the sequences. + * The following sub-blocks will always have repeat mode. + * @return : compressed size of sequences section of a sub-block + * Or 0 if it is unable to compress + * Or error code. */ +static size_t ZSTD_compressSubBlock_sequences(const ZSTD_fseCTables_t* fseTables, + const ZSTD_fseCTablesMetadata_t* fseMetadata, + const seqDef* sequences, size_t nbSeq, + const BYTE* llCode, const BYTE* mlCode, const BYTE* ofCode, + const ZSTD_CCtx_params* cctxParams, + void* dst, size_t dstCapacity, + const int bmi2, int writeEntropy, int* entropyWritten) +{ + const int longOffsets = cctxParams->cParams.windowLog > STREAM_ACCUMULATOR_MIN; + BYTE* const ostart = (BYTE*)dst; + BYTE* const oend = ostart + dstCapacity; + BYTE* op = ostart; + BYTE* seqHead; + + DEBUGLOG(5, "ZSTD_compressSubBlock_sequences (nbSeq=%zu, writeEntropy=%d, longOffsets=%d)", nbSeq, writeEntropy, longOffsets); + + *entropyWritten = 0; + /* Sequences Header */ + RETURN_ERROR_IF((oend-op) < 3 /*max nbSeq Size*/ + 1 /*seqHead*/, + dstSize_tooSmall, ""); + if (nbSeq < 0x7F) + *op++ = (BYTE)nbSeq; + else if (nbSeq < LONGNBSEQ) + op[0] = (BYTE)((nbSeq>>8) + 0x80), op[1] = (BYTE)nbSeq, op+=2; + else + op[0]=0xFF, MEM_writeLE16(op+1, (U16)(nbSeq - LONGNBSEQ)), op+=3; + if (nbSeq==0) { + return op - ostart; + } + + /* seqHead : flags for FSE encoding type */ + seqHead = op++; + + DEBUGLOG(5, "ZSTD_compressSubBlock_sequences (seqHeadSize=%u)", (unsigned)(op-ostart)); + + if (writeEntropy) { + const U32 LLtype = fseMetadata->llType; + const U32 Offtype = fseMetadata->ofType; + const U32 MLtype = fseMetadata->mlType; + DEBUGLOG(5, "ZSTD_compressSubBlock_sequences (fseTablesSize=%zu)", fseMetadata->fseTablesSize); + *seqHead = (BYTE)((LLtype<<6) + (Offtype<<4) + (MLtype<<2)); + memcpy(op, fseMetadata->fseTablesBuffer, fseMetadata->fseTablesSize); + op += fseMetadata->fseTablesSize; + } else { + const U32 repeat = set_repeat; + *seqHead = (BYTE)((repeat<<6) + (repeat<<4) + (repeat<<2)); + } + + { size_t const bitstreamSize = ZSTD_encodeSequences( + op, oend - op, + fseTables->matchlengthCTable, mlCode, + fseTables->offcodeCTable, ofCode, + fseTables->litlengthCTable, llCode, + sequences, nbSeq, + longOffsets, bmi2); + FORWARD_IF_ERROR(bitstreamSize, "ZSTD_encodeSequences failed"); + op += bitstreamSize; + /* zstd versions <= 1.3.4 mistakenly report corruption when + * FSE_readNCount() receives a buffer < 4 bytes. + * Fixed by https://github.com/facebook/zstd/pull/1146. + * This can happen when the last set_compressed table present is 2 + * bytes and the bitstream is only one byte. + * In this exceedingly rare case, we will simply emit an uncompressed + * block, since it isn't worth optimizing. + */ +#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION + if (writeEntropy && fseMetadata->lastCountSize && fseMetadata->lastCountSize + bitstreamSize < 4) { + /* NCountSize >= 2 && bitstreamSize > 0 ==> lastCountSize == 3 */ + assert(fseMetadata->lastCountSize + bitstreamSize == 3); + DEBUGLOG(5, "Avoiding bug in zstd decoder in versions <= 1.3.4 by " + "emitting an uncompressed block."); + return 0; + } +#endif + DEBUGLOG(5, "ZSTD_compressSubBlock_sequences (bitstreamSize=%zu)", bitstreamSize); + } + + /* zstd versions <= 1.4.0 mistakenly report error when + * sequences section body size is less than 3 bytes. + * Fixed by https://github.com/facebook/zstd/pull/1664. + * This can happen when the previous sequences section block is compressed + * with rle mode and the current block's sequences section is compressed + * with repeat mode where sequences section body size can be 1 byte. + */ +#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION + if (op-seqHead < 4) { + DEBUGLOG(5, "Avoiding bug in zstd decoder in versions <= 1.4.0 by emitting " + "an uncompressed block when sequences are < 4 bytes"); + return 0; + } +#endif + + *entropyWritten = 1; + return op - ostart; +} + +/** ZSTD_compressSubBlock() : + * Compresses a single sub-block. + * @return : compressed size of the sub-block + * Or 0 if it failed to compress. */ +static size_t ZSTD_compressSubBlock(const ZSTD_entropyCTables_t* entropy, + const ZSTD_entropyCTablesMetadata_t* entropyMetadata, + const seqDef* sequences, size_t nbSeq, + const BYTE* literals, size_t litSize, + const BYTE* llCode, const BYTE* mlCode, const BYTE* ofCode, + const ZSTD_CCtx_params* cctxParams, + void* dst, size_t dstCapacity, + const int bmi2, + int writeLitEntropy, int writeSeqEntropy, + int* litEntropyWritten, int* seqEntropyWritten, + U32 lastBlock) +{ + BYTE* const ostart = (BYTE*)dst; + BYTE* const oend = ostart + dstCapacity; + BYTE* op = ostart + ZSTD_blockHeaderSize; + DEBUGLOG(5, "ZSTD_compressSubBlock (litSize=%zu, nbSeq=%zu, writeLitEntropy=%d, writeSeqEntropy=%d, lastBlock=%d)", + litSize, nbSeq, writeLitEntropy, writeSeqEntropy, lastBlock); + { size_t cLitSize = ZSTD_compressSubBlock_literal((const HUF_CElt*)entropy->huf.CTable, + &entropyMetadata->hufMetadata, literals, litSize, + op, oend-op, bmi2, writeLitEntropy, litEntropyWritten); + FORWARD_IF_ERROR(cLitSize, "ZSTD_compressSubBlock_literal failed"); + if (cLitSize == 0) return 0; + op += cLitSize; + } + { size_t cSeqSize = ZSTD_compressSubBlock_sequences(&entropy->fse, + &entropyMetadata->fseMetadata, + sequences, nbSeq, + llCode, mlCode, ofCode, + cctxParams, + op, oend-op, + bmi2, writeSeqEntropy, seqEntropyWritten); + FORWARD_IF_ERROR(cSeqSize, "ZSTD_compressSubBlock_sequences failed"); + if (cSeqSize == 0) return 0; + op += cSeqSize; + } + /* Write block header */ + { size_t cSize = (op-ostart)-ZSTD_blockHeaderSize; + U32 const cBlockHeader24 = lastBlock + (((U32)bt_compressed)<<1) + (U32)(cSize << 3); + MEM_writeLE24(ostart, cBlockHeader24); + } + return op-ostart; +} + +static size_t ZSTD_estimateSubBlockSize_literal(const BYTE* literals, size_t litSize, + const ZSTD_hufCTables_t* huf, + const ZSTD_hufCTablesMetadata_t* hufMetadata, + void* workspace, size_t wkspSize, + int writeEntropy) +{ + unsigned* const countWksp = (unsigned*)workspace; + unsigned maxSymbolValue = 255; + size_t literalSectionHeaderSize = 3; /* Use hard coded size of 3 bytes */ + + if (hufMetadata->hType == set_basic) return litSize; + else if (hufMetadata->hType == set_rle) return 1; + else if (hufMetadata->hType == set_compressed || hufMetadata->hType == set_repeat) { + size_t const largest = HIST_count_wksp (countWksp, &maxSymbolValue, (const BYTE*)literals, litSize, workspace, wkspSize); + if (ZSTD_isError(largest)) return litSize; + { size_t cLitSizeEstimate = HUF_estimateCompressedSize((const HUF_CElt*)huf->CTable, countWksp, maxSymbolValue); + if (writeEntropy) cLitSizeEstimate += hufMetadata->hufDesSize; + return cLitSizeEstimate + literalSectionHeaderSize; + } } + assert(0); /* impossible */ + return 0; +} + +static size_t ZSTD_estimateSubBlockSize_symbolType(symbolEncodingType_e type, + const BYTE* codeTable, unsigned maxCode, + size_t nbSeq, const FSE_CTable* fseCTable, + const U32* additionalBits, + short const* defaultNorm, U32 defaultNormLog, + void* workspace, size_t wkspSize) +{ + unsigned* const countWksp = (unsigned*)workspace; + const BYTE* ctp = codeTable; + const BYTE* const ctStart = ctp; + const BYTE* const ctEnd = ctStart + nbSeq; + size_t cSymbolTypeSizeEstimateInBits = 0; + unsigned max = maxCode; + + HIST_countFast_wksp(countWksp, &max, codeTable, nbSeq, workspace, wkspSize); /* can't fail */ + if (type == set_basic) { + cSymbolTypeSizeEstimateInBits = ZSTD_crossEntropyCost(defaultNorm, defaultNormLog, countWksp, max); + } else if (type == set_rle) { + cSymbolTypeSizeEstimateInBits = 0; + } else if (type == set_compressed || type == set_repeat) { + cSymbolTypeSizeEstimateInBits = ZSTD_fseBitCost(fseCTable, countWksp, max); + } + if (ZSTD_isError(cSymbolTypeSizeEstimateInBits)) return nbSeq * 10; + while (ctp < ctEnd) { + if (additionalBits) cSymbolTypeSizeEstimateInBits += additionalBits[*ctp]; + else cSymbolTypeSizeEstimateInBits += *ctp; /* for offset, offset code is also the number of additional bits */ + ctp++; + } + return cSymbolTypeSizeEstimateInBits / 8; +} + +static size_t ZSTD_estimateSubBlockSize_sequences(const BYTE* ofCodeTable, + const BYTE* llCodeTable, + const BYTE* mlCodeTable, + size_t nbSeq, + const ZSTD_fseCTables_t* fseTables, + const ZSTD_fseCTablesMetadata_t* fseMetadata, + void* workspace, size_t wkspSize, + int writeEntropy) +{ + size_t sequencesSectionHeaderSize = 3; /* Use hard coded size of 3 bytes */ + size_t cSeqSizeEstimate = 0; + cSeqSizeEstimate += ZSTD_estimateSubBlockSize_symbolType(fseMetadata->ofType, ofCodeTable, MaxOff, + nbSeq, fseTables->offcodeCTable, NULL, + OF_defaultNorm, OF_defaultNormLog, + workspace, wkspSize); + cSeqSizeEstimate += ZSTD_estimateSubBlockSize_symbolType(fseMetadata->llType, llCodeTable, MaxLL, + nbSeq, fseTables->litlengthCTable, LL_bits, + LL_defaultNorm, LL_defaultNormLog, + workspace, wkspSize); + cSeqSizeEstimate += ZSTD_estimateSubBlockSize_symbolType(fseMetadata->mlType, mlCodeTable, MaxML, + nbSeq, fseTables->matchlengthCTable, ML_bits, + ML_defaultNorm, ML_defaultNormLog, + workspace, wkspSize); + if (writeEntropy) cSeqSizeEstimate += fseMetadata->fseTablesSize; + return cSeqSizeEstimate + sequencesSectionHeaderSize; +} + +static size_t ZSTD_estimateSubBlockSize(const BYTE* literals, size_t litSize, + const BYTE* ofCodeTable, + const BYTE* llCodeTable, + const BYTE* mlCodeTable, + size_t nbSeq, + const ZSTD_entropyCTables_t* entropy, + const ZSTD_entropyCTablesMetadata_t* entropyMetadata, + void* workspace, size_t wkspSize, + int writeLitEntropy, int writeSeqEntropy) { + size_t cSizeEstimate = 0; + cSizeEstimate += ZSTD_estimateSubBlockSize_literal(literals, litSize, + &entropy->huf, &entropyMetadata->hufMetadata, + workspace, wkspSize, writeLitEntropy); + cSizeEstimate += ZSTD_estimateSubBlockSize_sequences(ofCodeTable, llCodeTable, mlCodeTable, + nbSeq, &entropy->fse, &entropyMetadata->fseMetadata, + workspace, wkspSize, writeSeqEntropy); + return cSizeEstimate + ZSTD_blockHeaderSize; +} + +static int ZSTD_needSequenceEntropyTables(ZSTD_fseCTablesMetadata_t const* fseMetadata) +{ + if (fseMetadata->llType == set_compressed || fseMetadata->llType == set_rle) + return 1; + if (fseMetadata->mlType == set_compressed || fseMetadata->mlType == set_rle) + return 1; + if (fseMetadata->ofType == set_compressed || fseMetadata->ofType == set_rle) + return 1; + return 0; +} + +/** ZSTD_compressSubBlock_multi() : + * Breaks super-block into multiple sub-blocks and compresses them. + * Entropy will be written to the first block. + * The following blocks will use repeat mode to compress. + * All sub-blocks are compressed blocks (no raw or rle blocks). + * @return : compressed size of the super block (which is multiple ZSTD blocks) + * Or 0 if it failed to compress. */ +static size_t ZSTD_compressSubBlock_multi(const seqStore_t* seqStorePtr, + const ZSTD_compressedBlockState_t* prevCBlock, + ZSTD_compressedBlockState_t* nextCBlock, + const ZSTD_entropyCTablesMetadata_t* entropyMetadata, + const ZSTD_CCtx_params* cctxParams, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + const int bmi2, U32 lastBlock, + void* workspace, size_t wkspSize) +{ + const seqDef* const sstart = seqStorePtr->sequencesStart; + const seqDef* const send = seqStorePtr->sequences; + const seqDef* sp = sstart; + const BYTE* const lstart = seqStorePtr->litStart; + const BYTE* const lend = seqStorePtr->lit; + const BYTE* lp = lstart; + BYTE const* ip = (BYTE const*)src; + BYTE const* const iend = ip + srcSize; + BYTE* const ostart = (BYTE*)dst; + BYTE* const oend = ostart + dstCapacity; + BYTE* op = ostart; + const BYTE* llCodePtr = seqStorePtr->llCode; + const BYTE* mlCodePtr = seqStorePtr->mlCode; + const BYTE* ofCodePtr = seqStorePtr->ofCode; + size_t targetCBlockSize = cctxParams->targetCBlockSize; + size_t litSize, seqCount; + int writeLitEntropy = entropyMetadata->hufMetadata.hType == set_compressed; + int writeSeqEntropy = 1; + int lastSequence = 0; + + DEBUGLOG(5, "ZSTD_compressSubBlock_multi (litSize=%u, nbSeq=%u)", + (unsigned)(lend-lp), (unsigned)(send-sstart)); + + litSize = 0; + seqCount = 0; + do { + size_t cBlockSizeEstimate = 0; + if (sstart == send) { + lastSequence = 1; + } else { + const seqDef* const sequence = sp + seqCount; + lastSequence = sequence == send - 1; + litSize += ZSTD_getSequenceLength(seqStorePtr, sequence).litLength; + seqCount++; + } + if (lastSequence) { + assert(lp <= lend); + assert(litSize <= (size_t)(lend - lp)); + litSize = (size_t)(lend - lp); + } + /* I think there is an optimization opportunity here. + * Calling ZSTD_estimateSubBlockSize for every sequence can be wasteful + * since it recalculates estimate from scratch. + * For example, it would recount literal distribution and symbol codes everytime. + */ + cBlockSizeEstimate = ZSTD_estimateSubBlockSize(lp, litSize, ofCodePtr, llCodePtr, mlCodePtr, seqCount, + &nextCBlock->entropy, entropyMetadata, + workspace, wkspSize, writeLitEntropy, writeSeqEntropy); + if (cBlockSizeEstimate > targetCBlockSize || lastSequence) { + int litEntropyWritten = 0; + int seqEntropyWritten = 0; + const size_t decompressedSize = ZSTD_seqDecompressedSize(seqStorePtr, sp, seqCount, litSize, lastSequence); + const size_t cSize = ZSTD_compressSubBlock(&nextCBlock->entropy, entropyMetadata, + sp, seqCount, + lp, litSize, + llCodePtr, mlCodePtr, ofCodePtr, + cctxParams, + op, oend-op, + bmi2, writeLitEntropy, writeSeqEntropy, + &litEntropyWritten, &seqEntropyWritten, + lastBlock && lastSequence); + FORWARD_IF_ERROR(cSize, "ZSTD_compressSubBlock failed"); + if (cSize > 0 && cSize < decompressedSize) { + DEBUGLOG(5, "Committed the sub-block"); + assert(ip + decompressedSize <= iend); + ip += decompressedSize; + sp += seqCount; + lp += litSize; + op += cSize; + llCodePtr += seqCount; + mlCodePtr += seqCount; + ofCodePtr += seqCount; + litSize = 0; + seqCount = 0; + /* Entropy only needs to be written once */ + if (litEntropyWritten) { + writeLitEntropy = 0; + } + if (seqEntropyWritten) { + writeSeqEntropy = 0; + } + } + } + } while (!lastSequence); + if (writeLitEntropy) { + DEBUGLOG(5, "ZSTD_compressSubBlock_multi has literal entropy tables unwritten"); + memcpy(&nextCBlock->entropy.huf, &prevCBlock->entropy.huf, sizeof(prevCBlock->entropy.huf)); + } + if (writeSeqEntropy && ZSTD_needSequenceEntropyTables(&entropyMetadata->fseMetadata)) { + /* If we haven't written our entropy tables, then we've violated our contract and + * must emit an uncompressed block. + */ + DEBUGLOG(5, "ZSTD_compressSubBlock_multi has sequence entropy tables unwritten"); + return 0; + } + if (ip < iend) { + size_t const cSize = ZSTD_noCompressBlock(op, oend - op, ip, iend - ip, lastBlock); + DEBUGLOG(5, "ZSTD_compressSubBlock_multi last sub-block uncompressed, %zu bytes", (size_t)(iend - ip)); + FORWARD_IF_ERROR(cSize, "ZSTD_noCompressBlock failed"); + assert(cSize != 0); + op += cSize; + /* We have to regenerate the repcodes because we've skipped some sequences */ + if (sp < send) { + seqDef const* seq; + repcodes_t rep; + memcpy(&rep, prevCBlock->rep, sizeof(rep)); + for (seq = sstart; seq < sp; ++seq) { + rep = ZSTD_updateRep(rep.rep, seq->offset - 1, ZSTD_getSequenceLength(seqStorePtr, seq).litLength == 0); + } + memcpy(nextCBlock->rep, &rep, sizeof(rep)); + } + } + DEBUGLOG(5, "ZSTD_compressSubBlock_multi compressed"); + return op-ostart; +} + +size_t ZSTD_compressSuperBlock(ZSTD_CCtx* zc, + void* dst, size_t dstCapacity, + void const* src, size_t srcSize, + unsigned lastBlock) { + ZSTD_entropyCTablesMetadata_t entropyMetadata; + + FORWARD_IF_ERROR(ZSTD_buildSuperBlockEntropy(&zc->seqStore, + &zc->blockState.prevCBlock->entropy, + &zc->blockState.nextCBlock->entropy, + &zc->appliedParams, + &entropyMetadata, + zc->entropyWorkspace, HUF_WORKSPACE_SIZE /* statically allocated in resetCCtx */), ""); + + return ZSTD_compressSubBlock_multi(&zc->seqStore, + zc->blockState.prevCBlock, + zc->blockState.nextCBlock, + &entropyMetadata, + &zc->appliedParams, + dst, dstCapacity, + src, srcSize, + zc->bmi2, lastBlock, + zc->entropyWorkspace, HUF_WORKSPACE_SIZE /* statically allocated in resetCCtx */); +} diff --git a/thirdparty/zstd/compress/zstd_compress_superblock.h b/thirdparty/zstd/compress/zstd_compress_superblock.h new file mode 100644 index 0000000000..07f4cb1dc6 --- /dev/null +++ b/thirdparty/zstd/compress/zstd_compress_superblock.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_COMPRESS_ADVANCED_H +#define ZSTD_COMPRESS_ADVANCED_H + +/*-************************************* +* Dependencies +***************************************/ + +#include "../zstd.h" /* ZSTD_CCtx */ + +/*-************************************* +* Target Compressed Block Size +***************************************/ + +/* ZSTD_compressSuperBlock() : + * Used to compress a super block when targetCBlockSize is being used. + * The given block will be compressed into multiple sub blocks that are around targetCBlockSize. */ +size_t ZSTD_compressSuperBlock(ZSTD_CCtx* zc, + void* dst, size_t dstCapacity, + void const* src, size_t srcSize, + unsigned lastBlock); + +#endif /* ZSTD_COMPRESS_ADVANCED_H */ diff --git a/thirdparty/zstd/compress/zstd_cwksp.h b/thirdparty/zstd/compress/zstd_cwksp.h index fc9765bd3f..a25c9263b7 100644 --- a/thirdparty/zstd/compress/zstd_cwksp.h +++ b/thirdparty/zstd/compress/zstd_cwksp.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -14,7 +14,7 @@ /*-************************************* * Dependencies ***************************************/ -#include "zstd_internal.h" +#include "../common/zstd_internal.h" #if defined (__cplusplus) extern "C" { @@ -24,16 +24,6 @@ extern "C" { * Constants ***************************************/ -/* define "workspace is too large" as this number of times larger than needed */ -#define ZSTD_WORKSPACETOOLARGE_FACTOR 3 - -/* when workspace is continuously too large - * during at least this number of times, - * context's memory usage is considered wasteful, - * because it's sized to handle a worst case scenario which rarely happens. - * In which case, resize it down to free some memory */ -#define ZSTD_WORKSPACETOOLARGE_MAXDURATION 128 - /* Since the workspace is effectively its own little malloc implementation / * arena, when we run under ASAN, we should similarly insert redzones between * each internal element of the workspace, so ASAN will catch overruns that @@ -468,7 +458,7 @@ MEM_STATIC void ZSTD_cwksp_init(ZSTD_cwksp* ws, void* start, size_t size) { MEM_STATIC size_t ZSTD_cwksp_create(ZSTD_cwksp* ws, size_t size, ZSTD_customMem customMem) { void* workspace = ZSTD_malloc(size, customMem); DEBUGLOG(4, "cwksp: creating new workspace with %zd bytes", size); - RETURN_ERROR_IF(workspace == NULL, memory_allocation); + RETURN_ERROR_IF(workspace == NULL, memory_allocation, "NULL pointer!"); ZSTD_cwksp_init(ws, workspace, size); return 0; } diff --git a/thirdparty/zstd/compress/zstd_double_fast.c b/thirdparty/zstd/compress/zstd_double_fast.c index a661a48534..27eed66cfe 100644 --- a/thirdparty/zstd/compress/zstd_double_fast.c +++ b/thirdparty/zstd/compress/zstd_double_fast.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -63,10 +63,8 @@ size_t ZSTD_compressBlock_doubleFast_generic( const BYTE* ip = istart; const BYTE* anchor = istart; const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); - const U32 lowestValid = ms->window.dictLimit; - const U32 maxDistance = 1U << cParams->windowLog; /* presumes that, if there is a dictionary, it must be using Attach mode */ - const U32 prefixLowestIndex = (endIndex - lowestValid > maxDistance) ? endIndex - maxDistance : lowestValid; + const U32 prefixLowestIndex = ZSTD_getLowestPrefixIndex(ms, endIndex, cParams->windowLog); const BYTE* const prefixLowest = base + prefixLowestIndex; const BYTE* const iend = istart + srcSize; const BYTE* const ilimit = iend - HASH_READ_SIZE; @@ -96,7 +94,7 @@ size_t ZSTD_compressBlock_doubleFast_generic( dictCParams->hashLog : hBitsL; const U32 dictHBitsS = dictMode == ZSTD_dictMatchState ? dictCParams->chainLog : hBitsS; - const U32 dictAndPrefixLength = (U32)(ip - prefixLowest + dictEnd - dictStart); + const U32 dictAndPrefixLength = (U32)((ip - prefixLowest) + (dictEnd - dictStart)); DEBUGLOG(5, "ZSTD_compressBlock_doubleFast_generic"); @@ -104,13 +102,15 @@ size_t ZSTD_compressBlock_doubleFast_generic( /* if a dictionary is attached, it must be within window range */ if (dictMode == ZSTD_dictMatchState) { - assert(lowestValid + maxDistance >= endIndex); + assert(ms->window.dictLimit + (1U << cParams->windowLog) >= endIndex); } /* init */ ip += (dictAndPrefixLength == 0); if (dictMode == ZSTD_noDict) { - U32 const maxRep = (U32)(ip - prefixLowest); + U32 const current = (U32)(ip - base); + U32 const windowLow = ZSTD_getLowestPrefixIndex(ms, current, cParams->windowLog); + U32 const maxRep = current - windowLow; if (offset_2 > maxRep) offsetSaved = offset_2, offset_2 = 0; if (offset_1 > maxRep) offsetSaved = offset_1, offset_1 = 0; } @@ -198,6 +198,9 @@ size_t ZSTD_compressBlock_doubleFast_generic( } } ip += ((ip-anchor) >> kSearchStrength) + 1; +#if defined(__aarch64__) + PREFETCH_L1(ip+256); +#endif continue; _search_next_long: @@ -271,7 +274,7 @@ _match_stored: U32 const repIndex2 = current2 - offset_2; const BYTE* repMatch2 = dictMode == ZSTD_dictMatchState && repIndex2 < prefixLowestIndex ? - dictBase - dictIndexDelta + repIndex2 : + dictBase + repIndex2 - dictIndexDelta : base + repIndex2; if ( ((U32)((prefixLowestIndex-1) - (U32)repIndex2) >= 3 /* intentional overflow */) && (MEM_read32(repMatch2) == MEM_read32(ip)) ) { diff --git a/thirdparty/zstd/compress/zstd_double_fast.h b/thirdparty/zstd/compress/zstd_double_fast.h index 4fa31acfc0..14d944d69b 100644 --- a/thirdparty/zstd/compress/zstd_double_fast.h +++ b/thirdparty/zstd/compress/zstd_double_fast.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -15,7 +15,7 @@ extern "C" { #endif -#include "mem.h" /* U32 */ +#include "../common/mem.h" /* U32 */ #include "zstd_compress_internal.h" /* ZSTD_CCtx, size_t */ void ZSTD_fillDoubleHashTable(ZSTD_matchState_t* ms, diff --git a/thirdparty/zstd/compress/zstd_fast.c b/thirdparty/zstd/compress/zstd_fast.c index 6dbefee6b7..85a3a7a91e 100644 --- a/thirdparty/zstd/compress/zstd_fast.c +++ b/thirdparty/zstd/compress/zstd_fast.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -61,9 +61,7 @@ ZSTD_compressBlock_fast_generic( const BYTE* ip1; const BYTE* anchor = istart; const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); - const U32 maxDistance = 1U << cParams->windowLog; - const U32 validStartIndex = ms->window.dictLimit; - const U32 prefixStartIndex = (endIndex - validStartIndex > maxDistance) ? endIndex - maxDistance : validStartIndex; + const U32 prefixStartIndex = ZSTD_getLowestPrefixIndex(ms, endIndex, cParams->windowLog); const BYTE* const prefixStart = base + prefixStartIndex; const BYTE* const iend = istart + srcSize; const BYTE* const ilimit = iend - HASH_READ_SIZE; @@ -74,12 +72,21 @@ ZSTD_compressBlock_fast_generic( DEBUGLOG(5, "ZSTD_compressBlock_fast_generic"); ip0 += (ip0 == prefixStart); ip1 = ip0 + 1; - { U32 const maxRep = (U32)(ip0 - prefixStart); + { U32 const current = (U32)(ip0 - base); + U32 const windowLow = ZSTD_getLowestPrefixIndex(ms, current, cParams->windowLog); + U32 const maxRep = current - windowLow; if (offset_2 > maxRep) offsetSaved = offset_2, offset_2 = 0; if (offset_1 > maxRep) offsetSaved = offset_1, offset_1 = 0; } /* Main Search Loop */ +#ifdef __INTEL_COMPILER + /* From intel 'The vector pragma indicates that the loop should be + * vectorized if it is legal to do so'. Can be used together with + * #pragma ivdep (but have opted to exclude that because intel + * warns against using it).*/ + #pragma vector always +#endif while (ip1 < ilimit) { /* < instead of <=, because check at ip0+2 */ size_t mLength; BYTE const* ip2 = ip0 + 2; @@ -91,19 +98,25 @@ ZSTD_compressBlock_fast_generic( U32 const current1 = (U32)(ip1-base); U32 const matchIndex0 = hashTable[h0]; U32 const matchIndex1 = hashTable[h1]; - BYTE const* repMatch = ip2-offset_1; + BYTE const* repMatch = ip2 - offset_1; const BYTE* match0 = base + matchIndex0; const BYTE* match1 = base + matchIndex1; U32 offcode; + +#if defined(__aarch64__) + PREFETCH_L1(ip0+256); +#endif + hashTable[h0] = current0; /* update hash table */ hashTable[h1] = current1; /* update hash table */ assert(ip0 + 1 == ip1); if ((offset_1 > 0) & (MEM_read32(repMatch) == MEM_read32(ip2))) { - mLength = ip2[-1] == repMatch[-1] ? 1 : 0; + mLength = (ip2[-1] == repMatch[-1]) ? 1 : 0; ip0 = ip2 - mLength; match0 = repMatch - mLength; + mLength += 4; offcode = 0; goto _match; } @@ -128,19 +141,18 @@ _offset: /* Requires: ip0, match0 */ offset_2 = offset_1; offset_1 = (U32)(ip0-match0); offcode = offset_1 + ZSTD_REP_MOVE; - mLength = 0; + mLength = 4; /* Count the backwards match length */ while (((ip0>anchor) & (match0>prefixStart)) && (ip0[-1] == match0[-1])) { ip0--; match0--; mLength++; } /* catch up */ _match: /* Requires: ip0, match0, offcode */ /* Count the forward length */ - mLength += ZSTD_count(ip0+mLength+4, match0+mLength+4, iend) + 4; + mLength += ZSTD_count(ip0+mLength, match0+mLength, iend); ZSTD_storeSeq(seqStore, (size_t)(ip0-anchor), anchor, iend, offcode, mLength-MINMATCH); /* match found */ ip0 += mLength; anchor = ip0; - ip1 = ip0 + 1; if (ip0 <= ilimit) { /* Fill Table */ @@ -148,19 +160,18 @@ _match: /* Requires: ip0, match0, offcode */ hashTable[ZSTD_hashPtr(base+current0+2, hlog, mls)] = current0+2; /* here because current+2 could be > iend-8 */ hashTable[ZSTD_hashPtr(ip0-2, hlog, mls)] = (U32)(ip0-2-base); - while ( ((ip0 <= ilimit) & (offset_2>0)) /* offset_2==0 means offset_2 is invalidated */ - && (MEM_read32(ip0) == MEM_read32(ip0 - offset_2)) ) { - /* store sequence */ - size_t const rLength = ZSTD_count(ip0+4, ip0+4-offset_2, iend) + 4; - { U32 const tmpOff = offset_2; offset_2 = offset_1; offset_1 = tmpOff; } /* swap offset_2 <=> offset_1 */ - hashTable[ZSTD_hashPtr(ip0, hlog, mls)] = (U32)(ip0-base); - ip0 += rLength; - ip1 = ip0 + 1; - ZSTD_storeSeq(seqStore, 0 /*litLen*/, anchor, iend, 0 /*offCode*/, rLength-MINMATCH); - anchor = ip0; - continue; /* faster when present (confirmed on gcc-8) ... (?) */ - } - } + if (offset_2 > 0) { /* offset_2==0 means offset_2 is invalidated */ + while ( (ip0 <= ilimit) && (MEM_read32(ip0) == MEM_read32(ip0 - offset_2)) ) { + /* store sequence */ + size_t const rLength = ZSTD_count(ip0+4, ip0+4-offset_2, iend) + 4; + { U32 const tmpOff = offset_2; offset_2 = offset_1; offset_1 = tmpOff; } /* swap offset_2 <=> offset_1 */ + hashTable[ZSTD_hashPtr(ip0, hlog, mls)] = (U32)(ip0-base); + ip0 += rLength; + ZSTD_storeSeq(seqStore, 0 /*litLen*/, anchor, iend, 0 /*offCode*/, rLength-MINMATCH); + anchor = ip0; + continue; /* faster when present (confirmed on gcc-8) ... (?) */ + } } } + ip1 = ip0 + 1; } /* save reps for next block */ @@ -387,7 +398,7 @@ static size_t ZSTD_compressBlock_fast_extDict_generic( const BYTE* const ilimit = iend - 8; U32 offset_1=rep[0], offset_2=rep[1]; - DEBUGLOG(5, "ZSTD_compressBlock_fast_extDict_generic"); + DEBUGLOG(5, "ZSTD_compressBlock_fast_extDict_generic (offset_1=%u)", offset_1); /* switch to "regular" variant if extDict is invalidated due to maxDistance */ if (prefixStartIndex == dictStartIndex) @@ -404,6 +415,7 @@ static size_t ZSTD_compressBlock_fast_extDict_generic( const BYTE* const repBase = repIndex < prefixStartIndex ? dictBase : base; const BYTE* const repMatch = repBase + repIndex; hashTable[h] = current; /* update hash table */ + DEBUGLOG(7, "offset_1 = %u , current = %u", offset_1, current); assert(offset_1 <= current +1); /* check repIndex */ if ( (((U32)((prefixStartIndex-1) - repIndex) >= 3) /* intentional underflow */ & (repIndex > dictStartIndex)) diff --git a/thirdparty/zstd/compress/zstd_fast.h b/thirdparty/zstd/compress/zstd_fast.h index b74a88c57c..cf6aaa8e67 100644 --- a/thirdparty/zstd/compress/zstd_fast.h +++ b/thirdparty/zstd/compress/zstd_fast.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -15,7 +15,7 @@ extern "C" { #endif -#include "mem.h" /* U32 */ +#include "../common/mem.h" /* U32 */ #include "zstd_compress_internal.h" void ZSTD_fillHashTable(ZSTD_matchState_t* ms, diff --git a/thirdparty/zstd/compress/zstd_lazy.c b/thirdparty/zstd/compress/zstd_lazy.c index 9ad7e03b54..4cf5c88b53 100644 --- a/thirdparty/zstd/compress/zstd_lazy.c +++ b/thirdparty/zstd/compress/zstd_lazy.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -660,12 +660,16 @@ ZSTD_compressBlock_lazy_generic( const U32 dictIndexDelta = dictMode == ZSTD_dictMatchState ? prefixLowestIndex - (U32)(dictEnd - dictBase) : 0; - const U32 dictAndPrefixLength = (U32)(ip - prefixLowest + dictEnd - dictLowest); + const U32 dictAndPrefixLength = (U32)((ip - prefixLowest) + (dictEnd - dictLowest)); + + DEBUGLOG(5, "ZSTD_compressBlock_lazy_generic (dictMode=%u)", (U32)dictMode); /* init */ ip += (dictAndPrefixLength == 0); if (dictMode == ZSTD_noDict) { - U32 const maxRep = (U32)(ip - prefixLowest); + U32 const current = (U32)(ip - base); + U32 const windowLow = ZSTD_getLowestPrefixIndex(ms, current, ms->cParams.windowLog); + U32 const maxRep = current - windowLow; if (offset_2 > maxRep) savedOffset = offset_2, offset_2 = 0; if (offset_1 > maxRep) savedOffset = offset_1, offset_1 = 0; } @@ -677,6 +681,12 @@ ZSTD_compressBlock_lazy_generic( } /* Match Loop */ +#if defined(__GNUC__) && defined(__x86_64__) + /* I've measured random a 5% speed loss on levels 5 & 6 (greedy) when the + * code alignment is perturbed. To fix the instability align the loop on 32-bytes. + */ + __asm__(".p2align 5"); +#endif while (ip < ilimit) { size_t matchLength=0; size_t offset=0; @@ -929,11 +939,11 @@ size_t ZSTD_compressBlock_lazy_extDict_generic( const BYTE* const ilimit = iend - 8; const BYTE* const base = ms->window.base; const U32 dictLimit = ms->window.dictLimit; - const U32 lowestIndex = ms->window.lowLimit; const BYTE* const prefixStart = base + dictLimit; const BYTE* const dictBase = ms->window.dictBase; const BYTE* const dictEnd = dictBase + dictLimit; - const BYTE* const dictStart = dictBase + lowestIndex; + const BYTE* const dictStart = dictBase + ms->window.lowLimit; + const U32 windowLog = ms->cParams.windowLog; typedef size_t (*searchMax_f)( ZSTD_matchState_t* ms, @@ -942,10 +952,18 @@ size_t ZSTD_compressBlock_lazy_extDict_generic( U32 offset_1 = rep[0], offset_2 = rep[1]; + DEBUGLOG(5, "ZSTD_compressBlock_lazy_extDict_generic"); + /* init */ ip += (ip == prefixStart); /* Match Loop */ +#if defined(__GNUC__) && defined(__x86_64__) + /* I've measured random a 5% speed loss on levels 5 & 6 (greedy) when the + * code alignment is perturbed. To fix the instability align the loop on 32-bytes. + */ + __asm__(".p2align 5"); +#endif while (ip < ilimit) { size_t matchLength=0; size_t offset=0; @@ -953,10 +971,11 @@ size_t ZSTD_compressBlock_lazy_extDict_generic( U32 current = (U32)(ip-base); /* check repCode */ - { const U32 repIndex = (U32)(current+1 - offset_1); + { const U32 windowLow = ZSTD_getLowestMatchIndex(ms, current+1, windowLog); + const U32 repIndex = (U32)(current+1 - offset_1); const BYTE* const repBase = repIndex < dictLimit ? dictBase : base; const BYTE* const repMatch = repBase + repIndex; - if (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex > lowestIndex)) /* intentional overflow */ + if (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex > windowLow)) /* intentional overflow */ if (MEM_read32(ip+1) == MEM_read32(repMatch)) { /* repcode detected we should take it */ const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend; @@ -983,10 +1002,11 @@ size_t ZSTD_compressBlock_lazy_extDict_generic( current++; /* check repCode */ if (offset) { + const U32 windowLow = ZSTD_getLowestMatchIndex(ms, current, windowLog); const U32 repIndex = (U32)(current - offset_1); const BYTE* const repBase = repIndex < dictLimit ? dictBase : base; const BYTE* const repMatch = repBase + repIndex; - if (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex > lowestIndex)) /* intentional overflow */ + if (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex > windowLow)) /* intentional overflow */ if (MEM_read32(ip) == MEM_read32(repMatch)) { /* repcode detected */ const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend; @@ -1013,10 +1033,11 @@ size_t ZSTD_compressBlock_lazy_extDict_generic( current++; /* check repCode */ if (offset) { + const U32 windowLow = ZSTD_getLowestMatchIndex(ms, current, windowLog); const U32 repIndex = (U32)(current - offset_1); const BYTE* const repBase = repIndex < dictLimit ? dictBase : base; const BYTE* const repMatch = repBase + repIndex; - if (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex > lowestIndex)) /* intentional overflow */ + if (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex > windowLow)) /* intentional overflow */ if (MEM_read32(ip) == MEM_read32(repMatch)) { /* repcode detected */ const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend; @@ -1057,10 +1078,12 @@ _storeSequence: /* check immediate repcode */ while (ip <= ilimit) { - const U32 repIndex = (U32)((ip-base) - offset_2); + const U32 repCurrent = (U32)(ip-base); + const U32 windowLow = ZSTD_getLowestMatchIndex(ms, repCurrent, windowLog); + const U32 repIndex = repCurrent - offset_2; const BYTE* const repBase = repIndex < dictLimit ? dictBase : base; const BYTE* const repMatch = repBase + repIndex; - if (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex > lowestIndex)) /* intentional overflow */ + if (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex > windowLow)) /* intentional overflow */ if (MEM_read32(ip) == MEM_read32(repMatch)) { /* repcode detected we should take it */ const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend; diff --git a/thirdparty/zstd/compress/zstd_lazy.h b/thirdparty/zstd/compress/zstd_lazy.h index bb1763069f..581936f03b 100644 --- a/thirdparty/zstd/compress/zstd_lazy.h +++ b/thirdparty/zstd/compress/zstd_lazy.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the diff --git a/thirdparty/zstd/compress/zstd_ldm.c b/thirdparty/zstd/compress/zstd_ldm.c index c3312ad3e3..8c47948358 100644 --- a/thirdparty/zstd/compress/zstd_ldm.c +++ b/thirdparty/zstd/compress/zstd_ldm.c @@ -1,15 +1,16 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. */ #include "zstd_ldm.h" -#include "debug.h" +#include "../common/debug.h" #include "zstd_fast.h" /* ZSTD_fillHashTable() */ #include "zstd_double_fast.h" /* ZSTD_fillDoubleHashTable() */ @@ -223,6 +224,20 @@ static U64 ZSTD_ldm_fillLdmHashTable(ldmState_t* state, return rollingHash; } +void ZSTD_ldm_fillHashTable( + ldmState_t* state, const BYTE* ip, + const BYTE* iend, ldmParams_t const* params) +{ + DEBUGLOG(5, "ZSTD_ldm_fillHashTable"); + if ((size_t)(iend - ip) >= params->minMatchLength) { + U64 startingHash = ZSTD_rollingHash_compute(ip, params->minMatchLength); + ZSTD_ldm_fillLdmHashTable( + state, startingHash, ip, iend - params->minMatchLength, state->window.base, + params->hashLog - params->bucketSizeLog, + *params); + } +} + /** ZSTD_ldm_limitTableUpdate() : * @@ -449,6 +464,8 @@ size_t ZSTD_ldm_generateSequences( U32 const correction = ZSTD_window_correctOverflow( &ldmState->window, /* cycleLog */ 0, maxDist, chunkStart); ZSTD_ldm_reduceTable(ldmState->hashTable, ldmHSize, correction); + /* invalidate dictionaries on overflow correction */ + ldmState->loadedDictEnd = 0; } /* 2. We enforce the maximum offset allowed. * @@ -457,8 +474,14 @@ size_t ZSTD_ldm_generateSequences( * TODO: * Test the chunk size. * * Try invalidation after the sequence generation and test the * the offset against maxDist directly. + * + * NOTE: Because of dictionaries + sequence splitting we MUST make sure + * that any offset used is valid at the END of the sequence, since it may + * be split into two sequences. This condition holds when using + * ZSTD_window_enforceMaxDist(), but if we move to checking offsets + * against maxDist directly, we'll have to carefully handle that case. */ - ZSTD_window_enforceMaxDist(&ldmState->window, chunkEnd, maxDist, NULL, NULL); + ZSTD_window_enforceMaxDist(&ldmState->window, chunkEnd, maxDist, &ldmState->loadedDictEnd, NULL); /* 3. Generate the sequences for the chunk, and get newLeftoverSize. */ newLeftoverSize = ZSTD_ldm_generateSequences_internal( ldmState, sequences, params, chunkStart, chunkSize); @@ -566,14 +589,13 @@ size_t ZSTD_ldm_blockCompress(rawSeqStore_t* rawSeqStore, if (sequence.offset == 0) break; - assert(sequence.offset <= (1U << cParams->windowLog)); assert(ip + sequence.litLength + sequence.matchLength <= iend); /* Fill tables for block compressor */ ZSTD_ldm_limitTableUpdate(ms, ip); ZSTD_ldm_fillFastTables(ms, ip); /* Run the block compressor */ - DEBUGLOG(5, "calling block compressor on segment of size %u", sequence.litLength); + DEBUGLOG(5, "pos %u : calling block compressor on segment of size %u", (unsigned)(ip-istart), sequence.litLength); { size_t const newLitLength = blockCompressor(ms, seqStore, rep, ip, sequence.litLength); diff --git a/thirdparty/zstd/compress/zstd_ldm.h b/thirdparty/zstd/compress/zstd_ldm.h index a47846128b..229ea05a9e 100644 --- a/thirdparty/zstd/compress/zstd_ldm.h +++ b/thirdparty/zstd/compress/zstd_ldm.h @@ -1,10 +1,11 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. */ #ifndef ZSTD_LDM_H @@ -15,7 +16,7 @@ extern "C" { #endif #include "zstd_compress_internal.h" /* ldmParams_t, U32 */ -#include "zstd.h" /* ZSTD_CCtx, size_t */ +#include "../zstd.h" /* ZSTD_CCtx, size_t */ /*-************************************* * Long distance matching @@ -23,6 +24,10 @@ extern "C" { #define ZSTD_LDM_DEFAULT_WINDOW_LOG ZSTD_WINDOWLOG_LIMIT_DEFAULT +void ZSTD_ldm_fillHashTable( + ldmState_t* state, const BYTE* ip, + const BYTE* iend, ldmParams_t const* params); + /** * ZSTD_ldm_generateSequences(): * diff --git a/thirdparty/zstd/compress/zstd_opt.c b/thirdparty/zstd/compress/zstd_opt.c index 2e50fca6ff..36fff050cf 100644 --- a/thirdparty/zstd/compress/zstd_opt.c +++ b/thirdparty/zstd/compress/zstd_opt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Przemyslaw Skibinski, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Przemyslaw Skibinski, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -249,40 +249,6 @@ static U32 ZSTD_litLengthPrice(U32 const litLength, const optState_t* const optP } } -/* ZSTD_litLengthContribution() : - * @return ( cost(litlength) - cost(0) ) - * this value can then be added to rawLiteralsCost() - * to provide a cost which is directly comparable to a match ending at same position */ -static int ZSTD_litLengthContribution(U32 const litLength, const optState_t* const optPtr, int optLevel) -{ - if (optPtr->priceType >= zop_predef) return (int)WEIGHT(litLength, optLevel); - - /* dynamic statistics */ - { U32 const llCode = ZSTD_LLcode(litLength); - int const contribution = (int)(LL_bits[llCode] * BITCOST_MULTIPLIER) - + (int)WEIGHT(optPtr->litLengthFreq[0], optLevel) /* note: log2litLengthSum cancel out */ - - (int)WEIGHT(optPtr->litLengthFreq[llCode], optLevel); -#if 1 - return contribution; -#else - return MAX(0, contribution); /* sometimes better, sometimes not ... */ -#endif - } -} - -/* ZSTD_literalsContribution() : - * creates a fake cost for the literals part of a sequence - * which can be compared to the ending cost of a match - * should a new match start at this position */ -static int ZSTD_literalsContribution(const BYTE* const literals, U32 const litLength, - const optState_t* const optPtr, - int optLevel) -{ - int const contribution = (int)ZSTD_rawLiteralsCost(literals, litLength, optPtr, optLevel) - + ZSTD_litLengthContribution(litLength, optPtr, optLevel); - return contribution; -} - /* ZSTD_getMatchPrice() : * Provides the cost of the match part (offset + matchLength) of a sequence * Must be combined with ZSTD_fullLiteralsCost() to get the full cost of a sequence. @@ -603,7 +569,10 @@ U32 ZSTD_insertBtAndGetAllMatches ( U32 repLen = 0; assert(current >= dictLimit); if (repOffset-1 /* intentional overflow, discards 0 and -1 */ < current-dictLimit) { /* equivalent to `current > repIndex >= dictLimit` */ - if (ZSTD_readMINMATCH(ip, minMatch) == ZSTD_readMINMATCH(ip - repOffset, minMatch)) { + /* We must validate the repcode offset because when we're using a dictionary the + * valid offset range shrinks when the dictionary goes out of bounds. + */ + if ((repIndex >= windowLow) & (ZSTD_readMINMATCH(ip, minMatch) == ZSTD_readMINMATCH(ip - repOffset, minMatch))) { repLen = (U32)ZSTD_count(ip+minMatch, ip+minMatch-repOffset, iLimit) + minMatch; } } else { /* repIndex < dictLimit || repIndex >= current */ @@ -799,30 +768,6 @@ FORCE_INLINE_TEMPLATE U32 ZSTD_BtGetAllMatches ( /*-******************************* * Optimal parser *********************************/ -typedef struct repcodes_s { - U32 rep[3]; -} repcodes_t; - -static repcodes_t ZSTD_updateRep(U32 const rep[3], U32 const offset, U32 const ll0) -{ - repcodes_t newReps; - if (offset >= ZSTD_REP_NUM) { /* full offset */ - newReps.rep[2] = rep[1]; - newReps.rep[1] = rep[0]; - newReps.rep[0] = offset - ZSTD_REP_MOVE; - } else { /* repcode */ - U32 const repCode = offset + ll0; - if (repCode > 0) { /* note : if repCode==0, no change */ - U32 const currentOffset = (repCode==ZSTD_REP_NUM) ? (rep[0] - 1) : rep[repCode]; - newReps.rep[2] = (repCode >= 2) ? rep[1] : rep[2]; - newReps.rep[1] = rep[0]; - newReps.rep[0] = currentOffset; - } else { /* repCode == 0 */ - memcpy(&newReps, rep, sizeof(newReps)); - } - } - return newReps; -} static U32 ZSTD_totalLen(ZSTD_optimal_t sol) @@ -839,7 +784,7 @@ listStats(const U32* table, int lastEltID) int enb; for (enb=0; enb < nbElts; enb++) { (void)table; - //RAWLOG(2, "%3i:%3i, ", enb, table[enb]); + /* RAWLOG(2, "%3i:%3i, ", enb, table[enb]); */ RAWLOG(2, "%4i,", table[enb]); } RAWLOG(2, " \n"); @@ -894,7 +839,12 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, { U32 i ; for (i=0; i<ZSTD_REP_NUM; i++) opt[0].rep[i] = rep[i]; } opt[0].mlen = 0; /* means is_a_literal */ opt[0].litlen = litlen; - opt[0].price = ZSTD_literalsContribution(anchor, litlen, optStatePtr, optLevel); + /* We don't need to include the actual price of the literals because + * it is static for the duration of the forward pass, and is included + * in every price. We include the literal length to avoid negative + * prices when we subtract the previous literal length. + */ + opt[0].price = ZSTD_litLengthPrice(litlen, optStatePtr, optLevel); /* large match -> immediate encoding */ { U32 const maxML = matches[nbMatches-1].len; @@ -923,7 +873,6 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, for (matchNb = 0; matchNb < nbMatches; matchNb++) { U32 const offset = matches[matchNb].off; U32 const end = matches[matchNb].len; - repcodes_t const repHistory = ZSTD_updateRep(rep, offset, ll0); for ( ; pos <= end ; pos++ ) { U32 const matchPrice = ZSTD_getMatchPrice(offset, pos, optStatePtr, optLevel); U32 const sequencePrice = literalsPrice + matchPrice; @@ -933,8 +882,6 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, opt[pos].off = offset; opt[pos].litlen = litlen; opt[pos].price = sequencePrice; - ZSTD_STATIC_ASSERT(sizeof(opt[pos].rep) == sizeof(repHistory)); - memcpy(opt[pos].rep, &repHistory, sizeof(repHistory)); } } last_pos = pos-1; } @@ -961,7 +908,6 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, opt[cur].off = 0; opt[cur].litlen = litlen; opt[cur].price = price; - memcpy(opt[cur].rep, opt[cur-1].rep, sizeof(opt[cur].rep)); } else { DEBUGLOG(7, "cPos:%zi==rPos:%u : literal would cost more (%.2f>%.2f) (hist:%u,%u,%u)", inr-istart, cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), @@ -969,6 +915,21 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, } } + /* Set the repcodes of the current position. We must do it here + * because we rely on the repcodes of the 2nd to last sequence being + * correct to set the next chunks repcodes during the backward + * traversal. + */ + ZSTD_STATIC_ASSERT(sizeof(opt[cur].rep) == sizeof(repcodes_t)); + assert(cur >= opt[cur].mlen); + if (opt[cur].mlen != 0) { + U32 const prev = cur - opt[cur].mlen; + repcodes_t newReps = ZSTD_updateRep(opt[prev].rep, opt[cur].off, opt[cur].litlen==0); + memcpy(opt[cur].rep, &newReps, sizeof(repcodes_t)); + } else { + memcpy(opt[cur].rep, opt[cur - 1].rep, sizeof(repcodes_t)); + } + /* last match must start at a minimum distance of 8 from oend */ if (inr > ilimit) continue; @@ -1009,7 +970,6 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, /* set prices using matches found at position == cur */ for (matchNb = 0; matchNb < nbMatches; matchNb++) { U32 const offset = matches[matchNb].off; - repcodes_t const repHistory = ZSTD_updateRep(opt[cur].rep, offset, ll0); U32 const lastML = matches[matchNb].len; U32 const startML = (matchNb>0) ? matches[matchNb-1].len+1 : minMatch; U32 mlen; @@ -1029,8 +989,6 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, opt[pos].off = offset; opt[pos].litlen = litlen; opt[pos].price = price; - ZSTD_STATIC_ASSERT(sizeof(opt[pos].rep) == sizeof(repHistory)); - memcpy(opt[pos].rep, &repHistory, sizeof(repHistory)); } else { DEBUGLOG(7, "rPos:%u (ml=%2u) => new price is worse (%.2f>=%.2f)", pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); @@ -1046,6 +1004,17 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, _shortestPath: /* cur, last_pos, best_mlen, best_off have to be set */ assert(opt[0].mlen == 0); + /* Set the next chunk's repcodes based on the repcodes of the beginning + * of the last match, and the last sequence. This avoids us having to + * update them while traversing the sequences. + */ + if (lastSequence.mlen != 0) { + repcodes_t reps = ZSTD_updateRep(opt[cur].rep, lastSequence.off, lastSequence.litlen==0); + memcpy(rep, &reps, sizeof(reps)); + } else { + memcpy(rep, opt[cur].rep, sizeof(repcodes_t)); + } + { U32 const storeEnd = cur + 1; U32 storeStart = storeEnd; U32 seqPos = cur; @@ -1082,20 +1051,6 @@ _shortestPath: /* cur, last_pos, best_mlen, best_off have to be set */ continue; /* will finish */ } - /* repcodes update : like ZSTD_updateRep(), but update in place */ - if (offCode >= ZSTD_REP_NUM) { /* full offset */ - rep[2] = rep[1]; - rep[1] = rep[0]; - rep[0] = offCode - ZSTD_REP_MOVE; - } else { /* repcode */ - U32 const repCode = offCode + (llen==0); - if (repCode) { /* note : if repCode==0, no change */ - U32 const currentOffset = (repCode==ZSTD_REP_NUM) ? (rep[0] - 1) : rep[repCode]; - if (repCode >= 2) rep[2] = rep[1]; - rep[1] = rep[0]; - rep[0] = currentOffset; - } } - assert(anchor + llen <= iend); ZSTD_updateStats(optStatePtr, llen, anchor, offCode, mlen); ZSTD_storeSeq(seqStore, llen, anchor, iend, offCode, mlen-MINMATCH); @@ -1104,7 +1059,6 @@ _shortestPath: /* cur, last_pos, best_mlen, best_off have to be set */ } } ZSTD_setBasePrices(optStatePtr, optLevel); } - } /* while (ip < ilimit) */ /* Return the last literals size */ diff --git a/thirdparty/zstd/compress/zstd_opt.h b/thirdparty/zstd/compress/zstd_opt.h index 094f747665..9aba8a9018 100644 --- a/thirdparty/zstd/compress/zstd_opt.h +++ b/thirdparty/zstd/compress/zstd_opt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the diff --git a/thirdparty/zstd/compress/zstdmt_compress.c b/thirdparty/zstd/compress/zstdmt_compress.c index bc3062b530..1e3c8fdbee 100644 --- a/thirdparty/zstd/compress/zstdmt_compress.c +++ b/thirdparty/zstd/compress/zstdmt_compress.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -22,9 +22,9 @@ /* ====== Dependencies ====== */ #include <string.h> /* memcpy, memset */ #include <limits.h> /* INT_MAX, UINT_MAX */ -#include "mem.h" /* MEM_STATIC */ -#include "pool.h" /* threadpool */ -#include "threading.h" /* mutex */ +#include "../common/mem.h" /* MEM_STATIC */ +#include "../common/pool.h" /* threadpool */ +#include "../common/threading.h" /* mutex */ #include "zstd_compress_internal.h" /* MIN, ERROR, ZSTD_*, ZSTD_highbit32 */ #include "zstd_ldm.h" #include "zstdmt_compress.h" @@ -461,7 +461,13 @@ typedef struct { ZSTD_window_t ldmWindow; /* A thread-safe copy of ldmState.window */ } serialState_t; -static int ZSTDMT_serialState_reset(serialState_t* serialState, ZSTDMT_seqPool* seqPool, ZSTD_CCtx_params params, size_t jobSize) +static int +ZSTDMT_serialState_reset(serialState_t* serialState, + ZSTDMT_seqPool* seqPool, + ZSTD_CCtx_params params, + size_t jobSize, + const void* dict, size_t const dictSize, + ZSTD_dictContentType_e dictContentType) { /* Adjust parameters */ if (params.ldmParams.enableLdm) { @@ -490,8 +496,7 @@ static int ZSTDMT_serialState_reset(serialState_t* serialState, ZSTDMT_seqPool* /* Size the seq pool tables */ ZSTDMT_setNbSeq(seqPool, ZSTD_ldm_getMaxNbSeq(params.ldmParams, jobSize)); /* Reset the window */ - ZSTD_window_clear(&serialState->ldmState.window); - serialState->ldmWindow = serialState->ldmState.window; + ZSTD_window_init(&serialState->ldmState.window); /* Resize tables and output space if necessary. */ if (serialState->ldmState.hashTable == NULL || serialState->params.ldmParams.hashLog < hashLog) { ZSTD_free(serialState->ldmState.hashTable, cMem); @@ -506,7 +511,24 @@ static int ZSTDMT_serialState_reset(serialState_t* serialState, ZSTDMT_seqPool* /* Zero the tables */ memset(serialState->ldmState.hashTable, 0, hashSize); memset(serialState->ldmState.bucketOffsets, 0, bucketSize); + + /* Update window state and fill hash table with dict */ + serialState->ldmState.loadedDictEnd = 0; + if (dictSize > 0) { + if (dictContentType == ZSTD_dct_rawContent) { + BYTE const* const dictEnd = (const BYTE*)dict + dictSize; + ZSTD_window_update(&serialState->ldmState.window, dict, dictSize); + ZSTD_ldm_fillHashTable(&serialState->ldmState, (const BYTE*)dict, dictEnd, ¶ms.ldmParams); + serialState->ldmState.loadedDictEnd = params.forceWindow ? 0 : (U32)(dictEnd - serialState->ldmState.window.base); + } else { + /* don't even load anything */ + } + } + + /* Initialize serialState's copy of ldmWindow. */ + serialState->ldmWindow = serialState->ldmState.window; } + serialState->params = params; serialState->params.jobSize = (U32)jobSize; return 0; @@ -1054,7 +1076,7 @@ static ZSTD_CCtx_params ZSTDMT_initJobCCtxParams(const ZSTD_CCtx_params* params) static size_t ZSTDMT_resize(ZSTDMT_CCtx* mtctx, unsigned nbWorkers) { if (POOL_resize(mtctx->factory, nbWorkers)) return ERROR(memory_allocation); - FORWARD_IF_ERROR( ZSTDMT_expandJobsTable(mtctx, nbWorkers) ); + FORWARD_IF_ERROR( ZSTDMT_expandJobsTable(mtctx, nbWorkers) , ""); mtctx->bufPool = ZSTDMT_expandBufferPool(mtctx->bufPool, nbWorkers); if (mtctx->bufPool == NULL) return ERROR(memory_allocation); mtctx->cctxPool = ZSTDMT_expandCCtxPool(mtctx->cctxPool, nbWorkers); @@ -1076,7 +1098,7 @@ void ZSTDMT_updateCParams_whileCompressing(ZSTDMT_CCtx* mtctx, const ZSTD_CCtx_p DEBUGLOG(5, "ZSTDMT_updateCParams_whileCompressing (level:%i)", compressionLevel); mtctx->params.compressionLevel = compressionLevel; - { ZSTD_compressionParameters cParams = ZSTD_getCParamsFromCCtxParams(cctxParams, 0, 0); + { ZSTD_compressionParameters cParams = ZSTD_getCParamsFromCCtxParams(cctxParams, ZSTD_CONTENTSIZE_UNKNOWN, 0); cParams.windowLog = saved_wlog; mtctx->params.cParams = cParams; } @@ -1235,7 +1257,8 @@ ZSTDMT_computeNbJobs(const ZSTD_CCtx_params* params, size_t srcSize, unsigned nb /* ZSTDMT_compress_advanced_internal() : * This is a blocking function : it will only give back control to caller after finishing its compression job. */ -static size_t ZSTDMT_compress_advanced_internal( +static size_t +ZSTDMT_compress_advanced_internal( ZSTDMT_CCtx* mtctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize, @@ -1267,10 +1290,11 @@ static size_t ZSTDMT_compress_advanced_internal( assert(avgJobSize >= 256 KB); /* condition for ZSTD_compressBound(A) + ZSTD_compressBound(B) <= ZSTD_compressBound(A+B), required to compress directly into Dst (no additional buffer) */ ZSTDMT_setBufferSize(mtctx->bufPool, ZSTD_compressBound(avgJobSize) ); - if (ZSTDMT_serialState_reset(&mtctx->serial, mtctx->seqPool, params, avgJobSize)) + /* LDM doesn't even try to load the dictionary in single-ingestion mode */ + if (ZSTDMT_serialState_reset(&mtctx->serial, mtctx->seqPool, params, avgJobSize, NULL, 0, ZSTD_dct_auto)) return ERROR(memory_allocation); - FORWARD_IF_ERROR( ZSTDMT_expandJobsTable(mtctx, nbJobs) ); /* only expands if necessary */ + FORWARD_IF_ERROR( ZSTDMT_expandJobsTable(mtctx, nbJobs) , ""); /* only expands if necessary */ { unsigned u; for (u=0; u<nbJobs; u++) { @@ -1403,7 +1427,7 @@ size_t ZSTDMT_initCStream_internal( /* init */ if (params.nbWorkers != mtctx->params.nbWorkers) - FORWARD_IF_ERROR( ZSTDMT_resize(mtctx, params.nbWorkers) ); + FORWARD_IF_ERROR( ZSTDMT_resize(mtctx, params.nbWorkers) , ""); if (params.jobSize != 0 && params.jobSize < ZSTDMT_JOBSIZE_MIN) params.jobSize = ZSTDMT_JOBSIZE_MIN; if (params.jobSize > (size_t)ZSTDMT_JOBSIZE_MAX) params.jobSize = (size_t)ZSTDMT_JOBSIZE_MAX; @@ -1500,7 +1524,8 @@ size_t ZSTDMT_initCStream_internal( mtctx->allJobsCompleted = 0; mtctx->consumed = 0; mtctx->produced = 0; - if (ZSTDMT_serialState_reset(&mtctx->serial, mtctx->seqPool, params, mtctx->targetSectionSize)) + if (ZSTDMT_serialState_reset(&mtctx->serial, mtctx->seqPool, params, mtctx->targetSectionSize, + dict, dictSize, dictContentType)) return ERROR(memory_allocation); return 0; } @@ -1714,9 +1739,11 @@ static size_t ZSTDMT_flushProduced(ZSTDMT_CCtx* mtctx, ZSTD_outBuffer* output, u assert(mtctx->doneJobID < mtctx->nextJobID); assert(cSize >= mtctx->jobs[wJobID].dstFlushed); assert(mtctx->jobs[wJobID].dstBuff.start != NULL); - memcpy((char*)output->dst + output->pos, - (const char*)mtctx->jobs[wJobID].dstBuff.start + mtctx->jobs[wJobID].dstFlushed, - toFlush); + if (toFlush > 0) { + memcpy((char*)output->dst + output->pos, + (const char*)mtctx->jobs[wJobID].dstBuff.start + mtctx->jobs[wJobID].dstFlushed, + toFlush); + } output->pos += toFlush; mtctx->jobs[wJobID].dstFlushed += toFlush; /* can write : this value is only used by mtctx */ @@ -1786,7 +1813,7 @@ static int ZSTDMT_isOverlapped(buffer_t buffer, range_t range) BYTE const* const bufferStart = (BYTE const*)buffer.start; BYTE const* const bufferEnd = bufferStart + buffer.capacity; BYTE const* const rangeStart = (BYTE const*)range.start; - BYTE const* const rangeEnd = rangeStart + range.size; + BYTE const* const rangeEnd = range.size != 0 ? rangeStart + range.size : rangeStart; if (rangeStart == NULL || bufferStart == NULL) return 0; @@ -2060,7 +2087,7 @@ size_t ZSTDMT_compressStream_generic(ZSTDMT_CCtx* mtctx, || ((endOp == ZSTD_e_end) && (!mtctx->frameEnded)) ) { /* must finish the frame with a zero-size block */ size_t const jobSize = mtctx->inBuff.filled; assert(mtctx->inBuff.filled <= mtctx->targetSectionSize); - FORWARD_IF_ERROR( ZSTDMT_createCompressionJob(mtctx, jobSize, endOp) ); + FORWARD_IF_ERROR( ZSTDMT_createCompressionJob(mtctx, jobSize, endOp) , ""); } /* check for potential compressed data ready to be flushed */ @@ -2074,7 +2101,7 @@ size_t ZSTDMT_compressStream_generic(ZSTDMT_CCtx* mtctx, size_t ZSTDMT_compressStream(ZSTDMT_CCtx* mtctx, ZSTD_outBuffer* output, ZSTD_inBuffer* input) { - FORWARD_IF_ERROR( ZSTDMT_compressStream_generic(mtctx, output, input, ZSTD_e_continue) ); + FORWARD_IF_ERROR( ZSTDMT_compressStream_generic(mtctx, output, input, ZSTD_e_continue) , ""); /* recommended next input size : fill current input buffer */ return mtctx->targetSectionSize - mtctx->inBuff.filled; /* note : could be zero when input buffer is fully filled and no more availability to create new job */ @@ -2091,7 +2118,7 @@ static size_t ZSTDMT_flushStream_internal(ZSTDMT_CCtx* mtctx, ZSTD_outBuffer* ou || ((endFrame==ZSTD_e_end) && !mtctx->frameEnded)) { /* need a last 0-size block to end frame */ DEBUGLOG(5, "ZSTDMT_flushStream_internal : create a new job (%u bytes, end:%u)", (U32)srcSize, (U32)endFrame); - FORWARD_IF_ERROR( ZSTDMT_createCompressionJob(mtctx, srcSize, endFrame) ); + FORWARD_IF_ERROR( ZSTDMT_createCompressionJob(mtctx, srcSize, endFrame) , ""); } /* check if there is any data available to flush */ diff --git a/thirdparty/zstd/compress/zstdmt_compress.h b/thirdparty/zstd/compress/zstdmt_compress.h index 12a526087d..89914eb7f8 100644 --- a/thirdparty/zstd/compress/zstdmt_compress.h +++ b/thirdparty/zstd/compress/zstdmt_compress.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -40,7 +40,7 @@ /* === Dependencies === */ #include <stddef.h> /* size_t */ #define ZSTD_STATIC_LINKING_ONLY /* ZSTD_parameters */ -#include "zstd.h" /* ZSTD_inBuffer, ZSTD_outBuffer, ZSTDLIB_API */ +#include "../zstd.h" /* ZSTD_inBuffer, ZSTD_outBuffer, ZSTDLIB_API */ /* === Constants === */ diff --git a/thirdparty/zstd/decompress/huf_decompress.c b/thirdparty/zstd/decompress/huf_decompress.c index bb2d0a96bc..68293a1309 100644 --- a/thirdparty/zstd/decompress/huf_decompress.c +++ b/thirdparty/zstd/decompress/huf_decompress.c @@ -1,47 +1,27 @@ /* ****************************************************************** - huff0 huffman decoder, - part of Finite State Entropy library - Copyright (C) 2013-present, Yann Collet. - - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - FSE+HUF source repository : https://github.com/Cyan4973/FiniteStateEntropy + * huff0 huffman decoder, + * part of Finite State Entropy library + * Copyright (c) 2013-2020, Yann Collet, Facebook, Inc. + * + * You can contact the author at : + * - FSE+HUF source repository : https://github.com/Cyan4973/FiniteStateEntropy + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. ****************************************************************** */ /* ************************************************************** * Dependencies ****************************************************************/ #include <string.h> /* memcpy, memset */ -#include "compiler.h" -#include "bitstream.h" /* BIT_* */ -#include "fse.h" /* to compress headers */ +#include "../common/compiler.h" +#include "../common/bitstream.h" /* BIT_* */ +#include "../common/fse.h" /* to compress headers */ #define HUF_STATIC_LINKING_ONLY -#include "huf.h" -#include "error_private.h" +#include "../common/huf.h" +#include "../common/error_private.h" /* ************************************************************** * Macros @@ -61,9 +41,6 @@ * Error Management ****************************************************************/ #define HUF_isError ERR_isError -#ifndef CHECK_F -#define CHECK_F(f) { size_t const err_ = (f); if (HUF_isError(err_)) return err_; } -#endif /* ************************************************************** @@ -181,17 +158,29 @@ size_t HUF_readDTableX1_wksp(HUF_DTable* DTable, const void* src, size_t srcSize /* fill DTable */ { U32 n; - for (n=0; n<nbSymbols; n++) { - U32 const w = huffWeight[n]; - U32 const length = (1 << w) >> 1; - U32 u; + size_t const nEnd = nbSymbols; + for (n=0; n<nEnd; n++) { + size_t const w = huffWeight[n]; + size_t const length = (1 << w) >> 1; + size_t const uStart = rankVal[w]; + size_t const uEnd = uStart + length; + size_t u; HUF_DEltX1 D; - D.byte = (BYTE)n; D.nbBits = (BYTE)(tableLog + 1 - w); - for (u = rankVal[w]; u < rankVal[w] + length; u++) - dt[u] = D; - rankVal[w] += length; - } } - + D.byte = (BYTE)n; + D.nbBits = (BYTE)(tableLog + 1 - w); + rankVal[w] = (U32)uEnd; + if (length < 4) { + /* Use length in the loop bound so the compiler knows it is short. */ + for (u = 0; u < length; ++u) + dt[uStart + u] = D; + } else { + /* Unroll the loop 4 times, we know it is a power of 2. */ + for (u = uStart; u < uEnd; u += 4) { + dt[u + 0] = D; + dt[u + 1] = D; + dt[u + 2] = D; + dt[u + 3] = D; + } } } } return iSize; } @@ -282,6 +271,7 @@ HUF_decompress4X1_usingDTable_internal_body( { const BYTE* const istart = (const BYTE*) cSrc; BYTE* const ostart = (BYTE*) dst; BYTE* const oend = ostart + dstSize; + BYTE* const olimit = oend - 3; const void* const dtPtr = DTable + 1; const HUF_DEltX1* const dt = (const HUF_DEltX1*)dtPtr; @@ -306,9 +296,9 @@ HUF_decompress4X1_usingDTable_internal_body( BYTE* op2 = opStart2; BYTE* op3 = opStart3; BYTE* op4 = opStart4; - U32 endSignal = BIT_DStream_unfinished; DTableDesc const dtd = HUF_getDTableDesc(DTable); U32 const dtLog = dtd.tableLog; + U32 endSignal = 1; if (length4 > cSrcSize) return ERROR(corruption_detected); /* overflow */ CHECK_F( BIT_initDStream(&bitD1, istart1, length1) ); @@ -317,8 +307,7 @@ HUF_decompress4X1_usingDTable_internal_body( CHECK_F( BIT_initDStream(&bitD4, istart4, length4) ); /* up to 16 symbols per loop (4 symbols per stream) in 64-bit mode */ - endSignal = BIT_reloadDStream(&bitD1) | BIT_reloadDStream(&bitD2) | BIT_reloadDStream(&bitD3) | BIT_reloadDStream(&bitD4); - while ( (endSignal==BIT_DStream_unfinished) && (op4<(oend-3)) ) { + for ( ; (endSignal) & (op4 < olimit) ; ) { HUF_DECODE_SYMBOLX1_2(op1, &bitD1); HUF_DECODE_SYMBOLX1_2(op2, &bitD2); HUF_DECODE_SYMBOLX1_2(op3, &bitD3); @@ -335,10 +324,10 @@ HUF_decompress4X1_usingDTable_internal_body( HUF_DECODE_SYMBOLX1_0(op2, &bitD2); HUF_DECODE_SYMBOLX1_0(op3, &bitD3); HUF_DECODE_SYMBOLX1_0(op4, &bitD4); - BIT_reloadDStream(&bitD1); - BIT_reloadDStream(&bitD2); - BIT_reloadDStream(&bitD3); - BIT_reloadDStream(&bitD4); + endSignal &= BIT_reloadDStreamFast(&bitD1) == BIT_DStream_unfinished; + endSignal &= BIT_reloadDStreamFast(&bitD2) == BIT_DStream_unfinished; + endSignal &= BIT_reloadDStreamFast(&bitD3) == BIT_DStream_unfinished; + endSignal &= BIT_reloadDStreamFast(&bitD4) == BIT_DStream_unfinished; } /* check corruption */ @@ -757,7 +746,6 @@ HUF_decompress1X2_usingDTable_internal_body( return dstSize; } - FORCE_INLINE_TEMPLATE size_t HUF_decompress4X2_usingDTable_internal_body( void* dst, size_t dstSize, @@ -769,6 +757,7 @@ HUF_decompress4X2_usingDTable_internal_body( { const BYTE* const istart = (const BYTE*) cSrc; BYTE* const ostart = (BYTE*) dst; BYTE* const oend = ostart + dstSize; + BYTE* const olimit = oend - (sizeof(size_t)-1); const void* const dtPtr = DTable+1; const HUF_DEltX2* const dt = (const HUF_DEltX2*)dtPtr; @@ -793,7 +782,7 @@ HUF_decompress4X2_usingDTable_internal_body( BYTE* op2 = opStart2; BYTE* op3 = opStart3; BYTE* op4 = opStart4; - U32 endSignal; + U32 endSignal = 1; DTableDesc const dtd = HUF_getDTableDesc(DTable); U32 const dtLog = dtd.tableLog; @@ -804,8 +793,29 @@ HUF_decompress4X2_usingDTable_internal_body( CHECK_F( BIT_initDStream(&bitD4, istart4, length4) ); /* 16-32 symbols per loop (4-8 symbols per stream) */ - endSignal = BIT_reloadDStream(&bitD1) | BIT_reloadDStream(&bitD2) | BIT_reloadDStream(&bitD3) | BIT_reloadDStream(&bitD4); - for ( ; (endSignal==BIT_DStream_unfinished) & (op4<(oend-(sizeof(bitD4.bitContainer)-1))) ; ) { + for ( ; (endSignal) & (op4 < olimit); ) { +#if defined(__clang__) && (defined(__x86_64__) || defined(__i386__)) + HUF_DECODE_SYMBOLX2_2(op1, &bitD1); + HUF_DECODE_SYMBOLX2_1(op1, &bitD1); + HUF_DECODE_SYMBOLX2_2(op1, &bitD1); + HUF_DECODE_SYMBOLX2_0(op1, &bitD1); + HUF_DECODE_SYMBOLX2_2(op2, &bitD2); + HUF_DECODE_SYMBOLX2_1(op2, &bitD2); + HUF_DECODE_SYMBOLX2_2(op2, &bitD2); + HUF_DECODE_SYMBOLX2_0(op2, &bitD2); + endSignal &= BIT_reloadDStreamFast(&bitD1) == BIT_DStream_unfinished; + endSignal &= BIT_reloadDStreamFast(&bitD2) == BIT_DStream_unfinished; + HUF_DECODE_SYMBOLX2_2(op3, &bitD3); + HUF_DECODE_SYMBOLX2_1(op3, &bitD3); + HUF_DECODE_SYMBOLX2_2(op3, &bitD3); + HUF_DECODE_SYMBOLX2_0(op3, &bitD3); + HUF_DECODE_SYMBOLX2_2(op4, &bitD4); + HUF_DECODE_SYMBOLX2_1(op4, &bitD4); + HUF_DECODE_SYMBOLX2_2(op4, &bitD4); + HUF_DECODE_SYMBOLX2_0(op4, &bitD4); + endSignal &= BIT_reloadDStreamFast(&bitD3) == BIT_DStream_unfinished; + endSignal &= BIT_reloadDStreamFast(&bitD4) == BIT_DStream_unfinished; +#else HUF_DECODE_SYMBOLX2_2(op1, &bitD1); HUF_DECODE_SYMBOLX2_2(op2, &bitD2); HUF_DECODE_SYMBOLX2_2(op3, &bitD3); @@ -822,8 +832,12 @@ HUF_decompress4X2_usingDTable_internal_body( HUF_DECODE_SYMBOLX2_0(op2, &bitD2); HUF_DECODE_SYMBOLX2_0(op3, &bitD3); HUF_DECODE_SYMBOLX2_0(op4, &bitD4); - - endSignal = BIT_reloadDStream(&bitD1) | BIT_reloadDStream(&bitD2) | BIT_reloadDStream(&bitD3) | BIT_reloadDStream(&bitD4); + endSignal = (U32)LIKELY( + (BIT_reloadDStreamFast(&bitD1) == BIT_DStream_unfinished) + & (BIT_reloadDStreamFast(&bitD2) == BIT_DStream_unfinished) + & (BIT_reloadDStreamFast(&bitD3) == BIT_DStream_unfinished) + & (BIT_reloadDStreamFast(&bitD4) == BIT_DStream_unfinished)); +#endif } /* check corruption */ diff --git a/thirdparty/zstd/decompress/zstd_ddict.c b/thirdparty/zstd/decompress/zstd_ddict.c index 0af3d23bfe..c8cb8ecc95 100644 --- a/thirdparty/zstd/decompress/zstd_ddict.c +++ b/thirdparty/zstd/decompress/zstd_ddict.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -15,17 +15,17 @@ * Dependencies *********************************************************/ #include <string.h> /* memcpy, memmove, memset */ -#include "cpu.h" /* bmi2 */ -#include "mem.h" /* low level memory routines */ +#include "../common/cpu.h" /* bmi2 */ +#include "../common/mem.h" /* low level memory routines */ #define FSE_STATIC_LINKING_ONLY -#include "fse.h" +#include "../common/fse.h" #define HUF_STATIC_LINKING_ONLY -#include "huf.h" +#include "../common/huf.h" #include "zstd_decompress_internal.h" #include "zstd_ddict.h" #if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) -# include "zstd_legacy.h" +# include "../legacy/zstd_legacy.h" #endif @@ -65,6 +65,10 @@ void ZSTD_copyDDictParameters(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict) dctx->virtualStart = ddict->dictContent; dctx->dictEnd = (const BYTE*)ddict->dictContent + ddict->dictSize; dctx->previousDstEnd = dctx->dictEnd; +#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION + dctx->dictContentBeginForFuzzing = dctx->prefixStart; + dctx->dictContentEndForFuzzing = dctx->previousDstEnd; +#endif if (ddict->entropyPresent) { dctx->litEntropy = 1; dctx->fseEntropy = 1; @@ -107,7 +111,7 @@ ZSTD_loadEntropy_intoDDict(ZSTD_DDict* ddict, /* load entropy tables */ RETURN_ERROR_IF(ZSTD_isError(ZSTD_loadDEntropy( &ddict->entropy, ddict->dictContent, ddict->dictSize)), - dictionary_corrupted); + dictionary_corrupted, ""); ddict->entropyPresent = 1; return 0; } @@ -133,7 +137,7 @@ static size_t ZSTD_initDDict_internal(ZSTD_DDict* ddict, ddict->entropy.hufTable[0] = (HUF_DTable)((HufLog)*0x1000001); /* cover both little and big endian */ /* parse dictionary content */ - FORWARD_IF_ERROR( ZSTD_loadEntropy_intoDDict(ddict, dictContentType) ); + FORWARD_IF_ERROR( ZSTD_loadEntropy_intoDDict(ddict, dictContentType) , ""); return 0; } diff --git a/thirdparty/zstd/decompress/zstd_ddict.h b/thirdparty/zstd/decompress/zstd_ddict.h index 0479d11bb0..af307efd3d 100644 --- a/thirdparty/zstd/decompress/zstd_ddict.h +++ b/thirdparty/zstd/decompress/zstd_ddict.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -16,7 +16,7 @@ * Dependencies *********************************************************/ #include <stddef.h> /* size_t */ -#include "zstd.h" /* ZSTD_DDict, and several public functions */ +#include "../zstd.h" /* ZSTD_DDict, and several public functions */ /*-******************************************************* diff --git a/thirdparty/zstd/decompress/zstd_decompress.c b/thirdparty/zstd/decompress/zstd_decompress.c index dd4591b7be..be5c7cfc33 100644 --- a/thirdparty/zstd/decompress/zstd_decompress.c +++ b/thirdparty/zstd/decompress/zstd_decompress.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -56,19 +56,19 @@ * Dependencies *********************************************************/ #include <string.h> /* memcpy, memmove, memset */ -#include "cpu.h" /* bmi2 */ -#include "mem.h" /* low level memory routines */ +#include "../common/cpu.h" /* bmi2 */ +#include "../common/mem.h" /* low level memory routines */ #define FSE_STATIC_LINKING_ONLY -#include "fse.h" +#include "../common/fse.h" #define HUF_STATIC_LINKING_ONLY -#include "huf.h" -#include "zstd_internal.h" /* blockProperties_t */ +#include "../common/huf.h" +#include "../common/zstd_internal.h" /* blockProperties_t */ #include "zstd_decompress_internal.h" /* ZSTD_DCtx */ #include "zstd_ddict.h" /* ZSTD_DDictDictContent */ #include "zstd_decompress_block.h" /* ZSTD_decompressBlock_internal */ #if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) -# include "zstd_legacy.h" +# include "../legacy/zstd_legacy.h" #endif @@ -111,7 +111,12 @@ static void ZSTD_initDCtx_internal(ZSTD_DCtx* dctx) dctx->legacyContext = NULL; dctx->previousLegacyVersion = 0; dctx->noForwardProgress = 0; + dctx->oversizedDuration = 0; dctx->bmi2 = ZSTD_cpuid_bmi2(ZSTD_cpuid()); + dctx->outBufferMode = ZSTD_obm_buffered; +#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION + dctx->dictContentEndForFuzzing = NULL; +#endif } ZSTD_DCtx* ZSTD_initStaticDCtx(void *workspace, size_t workspaceSize) @@ -208,7 +213,7 @@ unsigned ZSTD_isFrame(const void* buffer, size_t size) static size_t ZSTD_frameHeaderSize_internal(const void* src, size_t srcSize, ZSTD_format_e format) { size_t const minInputSize = ZSTD_startingInputLength(format); - RETURN_ERROR_IF(srcSize < minInputSize, srcSize_wrong); + RETURN_ERROR_IF(srcSize < minInputSize, srcSize_wrong, ""); { BYTE const fhd = ((const BYTE*)src)[minInputSize-1]; U32 const dictID= fhd & 3; @@ -256,7 +261,7 @@ size_t ZSTD_getFrameHeader_advanced(ZSTD_frameHeader* zfhPtr, const void* src, s zfhPtr->frameType = ZSTD_skippableFrame; return 0; } - RETURN_ERROR(prefix_unknown); + RETURN_ERROR(prefix_unknown, ""); } /* ensure there is enough `srcSize` to fully read/decode frame header */ @@ -280,7 +285,7 @@ size_t ZSTD_getFrameHeader_advanced(ZSTD_frameHeader* zfhPtr, const void* src, s if (!singleSegment) { BYTE const wlByte = ip[pos++]; U32 const windowLog = (wlByte >> 3) + ZSTD_WINDOWLOG_ABSOLUTEMIN; - RETURN_ERROR_IF(windowLog > ZSTD_WINDOWLOG_MAX, frameParameter_windowTooLarge); + RETURN_ERROR_IF(windowLog > ZSTD_WINDOWLOG_MAX, frameParameter_windowTooLarge, ""); windowSize = (1ULL << windowLog); windowSize += (windowSize >> 3) * (wlByte&7); } @@ -352,14 +357,14 @@ static size_t readSkippableFrameSize(void const* src, size_t srcSize) size_t const skippableHeaderSize = ZSTD_SKIPPABLEHEADERSIZE; U32 sizeU32; - RETURN_ERROR_IF(srcSize < ZSTD_SKIPPABLEHEADERSIZE, srcSize_wrong); + RETURN_ERROR_IF(srcSize < ZSTD_SKIPPABLEHEADERSIZE, srcSize_wrong, ""); sizeU32 = MEM_readLE32((BYTE const*)src + ZSTD_FRAMEIDSIZE); RETURN_ERROR_IF((U32)(sizeU32 + ZSTD_SKIPPABLEHEADERSIZE) < sizeU32, - frameParameter_unsupported); + frameParameter_unsupported, ""); { size_t const skippableSize = skippableHeaderSize + sizeU32; - RETURN_ERROR_IF(skippableSize > srcSize, srcSize_wrong); + RETURN_ERROR_IF(skippableSize > srcSize, srcSize_wrong, ""); return skippableSize; } } @@ -439,7 +444,7 @@ static size_t ZSTD_decodeFrameHeader(ZSTD_DCtx* dctx, const void* src, size_t he * harder. */ RETURN_ERROR_IF(dctx->fParams.dictID && (dctx->dictID != dctx->fParams.dictID), - dictionary_wrong); + dictionary_wrong, ""); #endif if (dctx->fParams.checksumFlag) XXH64_reset(&dctx->xxhState, 0); return 0; @@ -559,17 +564,6 @@ unsigned long long ZSTD_decompressBound(const void* src, size_t srcSize) * Frame decoding ***************************************************************/ - -void ZSTD_checkContinuity(ZSTD_DCtx* dctx, const void* dst) -{ - if (dst != dctx->previousDstEnd) { /* not contiguous */ - dctx->dictEnd = dctx->previousDstEnd; - dctx->virtualStart = (const char*)dst - ((const char*)(dctx->previousDstEnd) - (const char*)(dctx->prefixStart)); - dctx->prefixStart = dst; - dctx->previousDstEnd = dst; - } -} - /** ZSTD_insertBlock() : * insert `src` block into `dctx` history. Useful to track uncompressed blocks. */ size_t ZSTD_insertBlock(ZSTD_DCtx* dctx, const void* blockStart, size_t blockSize) @@ -587,9 +581,9 @@ static size_t ZSTD_copyRawBlock(void* dst, size_t dstCapacity, DEBUGLOG(5, "ZSTD_copyRawBlock"); if (dst == NULL) { if (srcSize == 0) return 0; - RETURN_ERROR(dstBuffer_null); + RETURN_ERROR(dstBuffer_null, ""); } - RETURN_ERROR_IF(srcSize > dstCapacity, dstSize_tooSmall); + RETURN_ERROR_IF(srcSize > dstCapacity, dstSize_tooSmall, ""); memcpy(dst, src, srcSize); return srcSize; } @@ -600,9 +594,9 @@ static size_t ZSTD_setRleBlock(void* dst, size_t dstCapacity, { if (dst == NULL) { if (regenSize == 0) return 0; - RETURN_ERROR(dstBuffer_null); + RETURN_ERROR(dstBuffer_null, ""); } - RETURN_ERROR_IF(regenSize > dstCapacity, dstSize_tooSmall); + RETURN_ERROR_IF(regenSize > dstCapacity, dstSize_tooSmall, ""); memset(dst, b, regenSize); return regenSize; } @@ -618,7 +612,7 @@ static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx, { const BYTE* ip = (const BYTE*)(*srcPtr); BYTE* const ostart = (BYTE* const)dst; - BYTE* const oend = ostart + dstCapacity; + BYTE* const oend = dstCapacity != 0 ? ostart + dstCapacity : ostart; BYTE* op = ostart; size_t remainingSrcSize = *srcSizePtr; @@ -627,15 +621,15 @@ static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx, /* check */ RETURN_ERROR_IF( remainingSrcSize < ZSTD_FRAMEHEADERSIZE_MIN(dctx->format)+ZSTD_blockHeaderSize, - srcSize_wrong); + srcSize_wrong, ""); /* Frame Header */ { size_t const frameHeaderSize = ZSTD_frameHeaderSize_internal( ip, ZSTD_FRAMEHEADERSIZE_PREFIX(dctx->format), dctx->format); if (ZSTD_isError(frameHeaderSize)) return frameHeaderSize; RETURN_ERROR_IF(remainingSrcSize < frameHeaderSize+ZSTD_blockHeaderSize, - srcSize_wrong); - FORWARD_IF_ERROR( ZSTD_decodeFrameHeader(dctx, ip, frameHeaderSize) ); + srcSize_wrong, ""); + FORWARD_IF_ERROR( ZSTD_decodeFrameHeader(dctx, ip, frameHeaderSize) , ""); ip += frameHeaderSize; remainingSrcSize -= frameHeaderSize; } @@ -648,7 +642,7 @@ static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx, ip += ZSTD_blockHeaderSize; remainingSrcSize -= ZSTD_blockHeaderSize; - RETURN_ERROR_IF(cBlockSize > remainingSrcSize, srcSize_wrong); + RETURN_ERROR_IF(cBlockSize > remainingSrcSize, srcSize_wrong, ""); switch(blockProperties.blockType) { @@ -663,13 +657,15 @@ static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx, break; case bt_reserved : default: - RETURN_ERROR(corruption_detected); + RETURN_ERROR(corruption_detected, "invalid block type"); } if (ZSTD_isError(decodedSize)) return decodedSize; if (dctx->fParams.checksumFlag) XXH64_update(&dctx->xxhState, op, decodedSize); - op += decodedSize; + if (decodedSize != 0) + op += decodedSize; + assert(ip != NULL); ip += cBlockSize; remainingSrcSize -= cBlockSize; if (blockProperties.lastBlock) break; @@ -677,14 +673,14 @@ static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx, if (dctx->fParams.frameContentSize != ZSTD_CONTENTSIZE_UNKNOWN) { RETURN_ERROR_IF((U64)(op-ostart) != dctx->fParams.frameContentSize, - corruption_detected); + corruption_detected, ""); } if (dctx->fParams.checksumFlag) { /* Frame content checksum verification */ U32 const checkCalc = (U32)XXH64_digest(&dctx->xxhState); U32 checkRead; - RETURN_ERROR_IF(remainingSrcSize<4, checksum_wrong); + RETURN_ERROR_IF(remainingSrcSize<4, checksum_wrong, ""); checkRead = MEM_readLE32(ip); - RETURN_ERROR_IF(checkRead != checkCalc, checksum_wrong); + RETURN_ERROR_IF(checkRead != checkCalc, checksum_wrong, ""); ip += 4; remainingSrcSize -= 4; } @@ -741,7 +737,7 @@ static size_t ZSTD_decompressMultiFrame(ZSTD_DCtx* dctx, (unsigned)magicNumber, ZSTD_MAGICNUMBER); if ((magicNumber & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) { size_t const skippableSize = readSkippableFrameSize(src, srcSize); - FORWARD_IF_ERROR(skippableSize); + FORWARD_IF_ERROR(skippableSize, "readSkippableFrameSize failed"); assert(skippableSize <= srcSize); src = (const BYTE *)src + skippableSize; @@ -751,11 +747,11 @@ static size_t ZSTD_decompressMultiFrame(ZSTD_DCtx* dctx, if (ddict) { /* we were called from ZSTD_decompress_usingDDict */ - FORWARD_IF_ERROR(ZSTD_decompressBegin_usingDDict(dctx, ddict)); + FORWARD_IF_ERROR(ZSTD_decompressBegin_usingDDict(dctx, ddict), ""); } else { /* this will initialize correctly with no dict if dict == NULL, so * use this in all cases but ddict */ - FORWARD_IF_ERROR(ZSTD_decompressBegin_usingDict(dctx, dict, dictSize)); + FORWARD_IF_ERROR(ZSTD_decompressBegin_usingDict(dctx, dict, dictSize), ""); } ZSTD_checkContinuity(dctx, dst); @@ -776,7 +772,8 @@ static size_t ZSTD_decompressMultiFrame(ZSTD_DCtx* dctx, "error."); if (ZSTD_isError(res)) return res; assert(res <= dstCapacity); - dst = (BYTE*)dst + res; + if (res != 0) + dst = (BYTE*)dst + res; dstCapacity -= res; } moreThan1Frame = 1; @@ -824,7 +821,7 @@ size_t ZSTD_decompress(void* dst, size_t dstCapacity, const void* src, size_t sr #if defined(ZSTD_HEAPMODE) && (ZSTD_HEAPMODE>=1) size_t regenSize; ZSTD_DCtx* const dctx = ZSTD_createDCtx(); - RETURN_ERROR_IF(dctx==NULL, memory_allocation); + RETURN_ERROR_IF(dctx==NULL, memory_allocation, "NULL pointer!"); regenSize = ZSTD_decompressDCtx(dctx, dst, dstCapacity, src, srcSize); ZSTD_freeDCtx(dctx); return regenSize; @@ -842,6 +839,24 @@ size_t ZSTD_decompress(void* dst, size_t dstCapacity, const void* src, size_t sr ****************************************/ size_t ZSTD_nextSrcSizeToDecompress(ZSTD_DCtx* dctx) { return dctx->expected; } +/** + * Similar to ZSTD_nextSrcSizeToDecompress(), but when when a block input can be streamed, + * we allow taking a partial block as the input. Currently only raw uncompressed blocks can + * be streamed. + * + * For blocks that can be streamed, this allows us to reduce the latency until we produce + * output, and avoid copying the input. + * + * @param inputSize - The total amount of input that the caller currently has. + */ +static size_t ZSTD_nextSrcSizeToDecompressWithInputSize(ZSTD_DCtx* dctx, size_t inputSize) { + if (!(dctx->stage == ZSTDds_decompressBlock || dctx->stage == ZSTDds_decompressLastBlock)) + return dctx->expected; + if (dctx->bType != bt_raw) + return dctx->expected; + return MIN(MAX(inputSize, 1), dctx->expected); +} + ZSTD_nextInputType_e ZSTD_nextInputType(ZSTD_DCtx* dctx) { switch(dctx->stage) { @@ -874,7 +889,7 @@ size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, c { DEBUGLOG(5, "ZSTD_decompressContinue (srcSize:%u)", (unsigned)srcSize); /* Sanity check */ - RETURN_ERROR_IF(srcSize != dctx->expected, srcSize_wrong, "not allowed"); + RETURN_ERROR_IF(srcSize != ZSTD_nextSrcSizeToDecompressWithInputSize(dctx, srcSize), srcSize_wrong, "not allowed"); if (dstCapacity) ZSTD_checkContinuity(dctx, dst); switch (dctx->stage) @@ -899,7 +914,7 @@ size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, c case ZSTDds_decodeFrameHeader: assert(src != NULL); memcpy(dctx->headerBuffer + (dctx->headerSize - srcSize), src, srcSize); - FORWARD_IF_ERROR(ZSTD_decodeFrameHeader(dctx, dctx->headerBuffer, dctx->headerSize)); + FORWARD_IF_ERROR(ZSTD_decodeFrameHeader(dctx, dctx->headerBuffer, dctx->headerSize), ""); dctx->expected = ZSTD_blockHeaderSize; dctx->stage = ZSTDds_decodeBlockHeader; return 0; @@ -941,29 +956,41 @@ size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, c case bt_compressed: DEBUGLOG(5, "ZSTD_decompressContinue: case bt_compressed"); rSize = ZSTD_decompressBlock_internal(dctx, dst, dstCapacity, src, srcSize, /* frame */ 1); + dctx->expected = 0; /* Streaming not supported */ break; case bt_raw : + assert(srcSize <= dctx->expected); rSize = ZSTD_copyRawBlock(dst, dstCapacity, src, srcSize); + FORWARD_IF_ERROR(rSize, "ZSTD_copyRawBlock failed"); + assert(rSize == srcSize); + dctx->expected -= rSize; break; case bt_rle : rSize = ZSTD_setRleBlock(dst, dstCapacity, *(const BYTE*)src, dctx->rleSize); + dctx->expected = 0; /* Streaming not supported */ break; case bt_reserved : /* should never happen */ default: - RETURN_ERROR(corruption_detected); + RETURN_ERROR(corruption_detected, "invalid block type"); } - if (ZSTD_isError(rSize)) return rSize; + FORWARD_IF_ERROR(rSize, ""); RETURN_ERROR_IF(rSize > dctx->fParams.blockSizeMax, corruption_detected, "Decompressed Block Size Exceeds Maximum"); DEBUGLOG(5, "ZSTD_decompressContinue: decoded size from block : %u", (unsigned)rSize); dctx->decodedSize += rSize; if (dctx->fParams.checksumFlag) XXH64_update(&dctx->xxhState, dst, rSize); + dctx->previousDstEnd = (char*)dst + rSize; + + /* Stay on the same stage until we are finished streaming the block. */ + if (dctx->expected > 0) { + return rSize; + } if (dctx->stage == ZSTDds_decompressLastBlock) { /* end of frame */ DEBUGLOG(4, "ZSTD_decompressContinue: decoded size from frame : %u", (unsigned)dctx->decodedSize); RETURN_ERROR_IF( dctx->fParams.frameContentSize != ZSTD_CONTENTSIZE_UNKNOWN && dctx->decodedSize != dctx->fParams.frameContentSize, - corruption_detected); + corruption_detected, ""); if (dctx->fParams.checksumFlag) { /* another round for frame checksum */ dctx->expected = 4; dctx->stage = ZSTDds_checkChecksum; @@ -974,7 +1001,6 @@ size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, c } else { dctx->stage = ZSTDds_decodeBlockHeader; dctx->expected = ZSTD_blockHeaderSize; - dctx->previousDstEnd = (char*)dst + rSize; } return rSize; } @@ -984,7 +1010,7 @@ size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, c { U32 const h32 = (U32)XXH64_digest(&dctx->xxhState); U32 const check32 = MEM_readLE32(src); DEBUGLOG(4, "ZSTD_decompressContinue: checksum : calculated %08X :: %08X read", (unsigned)h32, (unsigned)check32); - RETURN_ERROR_IF(check32 != h32, checksum_wrong); + RETURN_ERROR_IF(check32 != h32, checksum_wrong, ""); dctx->expected = 0; dctx->stage = ZSTDds_getFrameHeaderSize; return 0; @@ -1005,7 +1031,7 @@ size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, c default: assert(0); /* impossible */ - RETURN_ERROR(GENERIC); /* some compiler require default to do something */ + RETURN_ERROR(GENERIC, "impossible to reach"); /* some compiler require default to do something */ } } @@ -1016,6 +1042,10 @@ static size_t ZSTD_refDictContent(ZSTD_DCtx* dctx, const void* dict, size_t dict dctx->virtualStart = (const char*)dict - ((const char*)(dctx->previousDstEnd) - (const char*)(dctx->prefixStart)); dctx->prefixStart = dict; dctx->previousDstEnd = (const char*)dict + dictSize; +#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION + dctx->dictContentBeginForFuzzing = dctx->prefixStart; + dctx->dictContentEndForFuzzing = dctx->previousDstEnd; +#endif return 0; } @@ -1029,7 +1059,7 @@ ZSTD_loadDEntropy(ZSTD_entropyDTables_t* entropy, const BYTE* dictPtr = (const BYTE*)dict; const BYTE* const dictEnd = dictPtr + dictSize; - RETURN_ERROR_IF(dictSize <= 8, dictionary_corrupted); + RETURN_ERROR_IF(dictSize <= 8, dictionary_corrupted, "dict is too small"); assert(MEM_readLE32(dict) == ZSTD_MAGIC_DICTIONARY); /* dict must be valid */ dictPtr += 8; /* skip header = magic + dictID */ @@ -1048,16 +1078,16 @@ ZSTD_loadDEntropy(ZSTD_entropyDTables_t* entropy, dictPtr, dictEnd - dictPtr, workspace, workspaceSize); #endif - RETURN_ERROR_IF(HUF_isError(hSize), dictionary_corrupted); + RETURN_ERROR_IF(HUF_isError(hSize), dictionary_corrupted, ""); dictPtr += hSize; } { short offcodeNCount[MaxOff+1]; unsigned offcodeMaxValue = MaxOff, offcodeLog; size_t const offcodeHeaderSize = FSE_readNCount(offcodeNCount, &offcodeMaxValue, &offcodeLog, dictPtr, dictEnd-dictPtr); - RETURN_ERROR_IF(FSE_isError(offcodeHeaderSize), dictionary_corrupted); - RETURN_ERROR_IF(offcodeMaxValue > MaxOff, dictionary_corrupted); - RETURN_ERROR_IF(offcodeLog > OffFSELog, dictionary_corrupted); + RETURN_ERROR_IF(FSE_isError(offcodeHeaderSize), dictionary_corrupted, ""); + RETURN_ERROR_IF(offcodeMaxValue > MaxOff, dictionary_corrupted, ""); + RETURN_ERROR_IF(offcodeLog > OffFSELog, dictionary_corrupted, ""); ZSTD_buildFSETable( entropy->OFTable, offcodeNCount, offcodeMaxValue, OF_base, OF_bits, @@ -1068,9 +1098,9 @@ ZSTD_loadDEntropy(ZSTD_entropyDTables_t* entropy, { short matchlengthNCount[MaxML+1]; unsigned matchlengthMaxValue = MaxML, matchlengthLog; size_t const matchlengthHeaderSize = FSE_readNCount(matchlengthNCount, &matchlengthMaxValue, &matchlengthLog, dictPtr, dictEnd-dictPtr); - RETURN_ERROR_IF(FSE_isError(matchlengthHeaderSize), dictionary_corrupted); - RETURN_ERROR_IF(matchlengthMaxValue > MaxML, dictionary_corrupted); - RETURN_ERROR_IF(matchlengthLog > MLFSELog, dictionary_corrupted); + RETURN_ERROR_IF(FSE_isError(matchlengthHeaderSize), dictionary_corrupted, ""); + RETURN_ERROR_IF(matchlengthMaxValue > MaxML, dictionary_corrupted, ""); + RETURN_ERROR_IF(matchlengthLog > MLFSELog, dictionary_corrupted, ""); ZSTD_buildFSETable( entropy->MLTable, matchlengthNCount, matchlengthMaxValue, ML_base, ML_bits, @@ -1081,9 +1111,9 @@ ZSTD_loadDEntropy(ZSTD_entropyDTables_t* entropy, { short litlengthNCount[MaxLL+1]; unsigned litlengthMaxValue = MaxLL, litlengthLog; size_t const litlengthHeaderSize = FSE_readNCount(litlengthNCount, &litlengthMaxValue, &litlengthLog, dictPtr, dictEnd-dictPtr); - RETURN_ERROR_IF(FSE_isError(litlengthHeaderSize), dictionary_corrupted); - RETURN_ERROR_IF(litlengthMaxValue > MaxLL, dictionary_corrupted); - RETURN_ERROR_IF(litlengthLog > LLFSELog, dictionary_corrupted); + RETURN_ERROR_IF(FSE_isError(litlengthHeaderSize), dictionary_corrupted, ""); + RETURN_ERROR_IF(litlengthMaxValue > MaxLL, dictionary_corrupted, ""); + RETURN_ERROR_IF(litlengthLog > LLFSELog, dictionary_corrupted, ""); ZSTD_buildFSETable( entropy->LLTable, litlengthNCount, litlengthMaxValue, LL_base, LL_bits, @@ -1091,13 +1121,13 @@ ZSTD_loadDEntropy(ZSTD_entropyDTables_t* entropy, dictPtr += litlengthHeaderSize; } - RETURN_ERROR_IF(dictPtr+12 > dictEnd, dictionary_corrupted); + RETURN_ERROR_IF(dictPtr+12 > dictEnd, dictionary_corrupted, ""); { int i; size_t const dictContentSize = (size_t)(dictEnd - (dictPtr+12)); for (i=0; i<3; i++) { U32 const rep = MEM_readLE32(dictPtr); dictPtr += 4; RETURN_ERROR_IF(rep==0 || rep > dictContentSize, - dictionary_corrupted); + dictionary_corrupted, ""); entropy->rep[i] = rep; } } @@ -1115,7 +1145,7 @@ static size_t ZSTD_decompress_insertDictionary(ZSTD_DCtx* dctx, const void* dict /* load entropy tables */ { size_t const eSize = ZSTD_loadDEntropy(&dctx->entropy, dict, dictSize); - RETURN_ERROR_IF(ZSTD_isError(eSize), dictionary_corrupted); + RETURN_ERROR_IF(ZSTD_isError(eSize), dictionary_corrupted, ""); dict = (const char*)dict + eSize; dictSize -= eSize; } @@ -1138,6 +1168,7 @@ size_t ZSTD_decompressBegin(ZSTD_DCtx* dctx) dctx->entropy.hufTable[0] = (HUF_DTable)((HufLog)*0x1000001); /* cover both little and big endian */ dctx->litEntropy = dctx->fseEntropy = 0; dctx->dictID = 0; + dctx->bType = bt_reserved; ZSTD_STATIC_ASSERT(sizeof(dctx->entropy.rep) == sizeof(repStartValue)); memcpy(dctx->entropy.rep, repStartValue, sizeof(repStartValue)); /* initial repcodes */ dctx->LLTptr = dctx->entropy.LLTable; @@ -1149,11 +1180,11 @@ size_t ZSTD_decompressBegin(ZSTD_DCtx* dctx) size_t ZSTD_decompressBegin_usingDict(ZSTD_DCtx* dctx, const void* dict, size_t dictSize) { - FORWARD_IF_ERROR( ZSTD_decompressBegin(dctx) ); + FORWARD_IF_ERROR( ZSTD_decompressBegin(dctx) , ""); if (dict && dictSize) RETURN_ERROR_IF( ZSTD_isError(ZSTD_decompress_insertDictionary(dctx, dict, dictSize)), - dictionary_corrupted); + dictionary_corrupted, ""); return 0; } @@ -1172,7 +1203,7 @@ size_t ZSTD_decompressBegin_usingDDict(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict) DEBUGLOG(4, "DDict is %s", dctx->ddictIsCold ? "~cold~" : "hot!"); } - FORWARD_IF_ERROR( ZSTD_decompressBegin(dctx) ); + FORWARD_IF_ERROR( ZSTD_decompressBegin(dctx) , ""); if (ddict) { /* NULL ddict is equivalent to no dictionary */ ZSTD_copyDDictParameters(dctx, ddict); } @@ -1263,11 +1294,11 @@ size_t ZSTD_DCtx_loadDictionary_advanced(ZSTD_DCtx* dctx, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType) { - RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong); + RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong, ""); ZSTD_clearDict(dctx); if (dict && dictSize != 0) { dctx->ddictLocal = ZSTD_createDDict_advanced(dict, dictSize, dictLoadMethod, dictContentType, dctx->customMem); - RETURN_ERROR_IF(dctx->ddictLocal == NULL, memory_allocation); + RETURN_ERROR_IF(dctx->ddictLocal == NULL, memory_allocation, "NULL pointer!"); dctx->ddict = dctx->ddictLocal; dctx->dictUses = ZSTD_use_indefinitely; } @@ -1286,7 +1317,7 @@ size_t ZSTD_DCtx_loadDictionary(ZSTD_DCtx* dctx, const void* dict, size_t dictSi size_t ZSTD_DCtx_refPrefix_advanced(ZSTD_DCtx* dctx, const void* prefix, size_t prefixSize, ZSTD_dictContentType_e dictContentType) { - FORWARD_IF_ERROR(ZSTD_DCtx_loadDictionary_advanced(dctx, prefix, prefixSize, ZSTD_dlm_byRef, dictContentType)); + FORWARD_IF_ERROR(ZSTD_DCtx_loadDictionary_advanced(dctx, prefix, prefixSize, ZSTD_dlm_byRef, dictContentType), ""); dctx->dictUses = ZSTD_use_once; return 0; } @@ -1303,8 +1334,8 @@ size_t ZSTD_DCtx_refPrefix(ZSTD_DCtx* dctx, const void* prefix, size_t prefixSiz size_t ZSTD_initDStream_usingDict(ZSTD_DStream* zds, const void* dict, size_t dictSize) { DEBUGLOG(4, "ZSTD_initDStream_usingDict"); - FORWARD_IF_ERROR( ZSTD_DCtx_reset(zds, ZSTD_reset_session_only) ); - FORWARD_IF_ERROR( ZSTD_DCtx_loadDictionary(zds, dict, dictSize) ); + FORWARD_IF_ERROR( ZSTD_DCtx_reset(zds, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_DCtx_loadDictionary(zds, dict, dictSize) , ""); return ZSTD_startingInputLength(zds->format); } @@ -1320,8 +1351,8 @@ size_t ZSTD_initDStream(ZSTD_DStream* zds) * this function cannot fail */ size_t ZSTD_initDStream_usingDDict(ZSTD_DStream* dctx, const ZSTD_DDict* ddict) { - FORWARD_IF_ERROR( ZSTD_DCtx_reset(dctx, ZSTD_reset_session_only) ); - FORWARD_IF_ERROR( ZSTD_DCtx_refDDict(dctx, ddict) ); + FORWARD_IF_ERROR( ZSTD_DCtx_reset(dctx, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_DCtx_refDDict(dctx, ddict) , ""); return ZSTD_startingInputLength(dctx->format); } @@ -1330,14 +1361,14 @@ size_t ZSTD_initDStream_usingDDict(ZSTD_DStream* dctx, const ZSTD_DDict* ddict) * this function cannot fail */ size_t ZSTD_resetDStream(ZSTD_DStream* dctx) { - FORWARD_IF_ERROR(ZSTD_DCtx_reset(dctx, ZSTD_reset_session_only)); + FORWARD_IF_ERROR(ZSTD_DCtx_reset(dctx, ZSTD_reset_session_only), ""); return ZSTD_startingInputLength(dctx->format); } size_t ZSTD_DCtx_refDDict(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict) { - RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong); + RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong, ""); ZSTD_clearDict(dctx); if (ddict) { dctx->ddict = ddict; @@ -1354,9 +1385,9 @@ size_t ZSTD_DCtx_setMaxWindowSize(ZSTD_DCtx* dctx, size_t maxWindowSize) ZSTD_bounds const bounds = ZSTD_dParam_getBounds(ZSTD_d_windowLogMax); size_t const min = (size_t)1 << bounds.lowerBound; size_t const max = (size_t)1 << bounds.upperBound; - RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong); - RETURN_ERROR_IF(maxWindowSize < min, parameter_outOfBound); - RETURN_ERROR_IF(maxWindowSize > max, parameter_outOfBound); + RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong, ""); + RETURN_ERROR_IF(maxWindowSize < min, parameter_outOfBound, ""); + RETURN_ERROR_IF(maxWindowSize > max, parameter_outOfBound, ""); dctx->maxWindowSize = maxWindowSize; return 0; } @@ -1379,6 +1410,10 @@ ZSTD_bounds ZSTD_dParam_getBounds(ZSTD_dParameter dParam) bounds.upperBound = (int)ZSTD_f_zstd1_magicless; ZSTD_STATIC_ASSERT(ZSTD_f_zstd1 < ZSTD_f_zstd1_magicless); return bounds; + case ZSTD_d_stableOutBuffer: + bounds.lowerBound = (int)ZSTD_obm_buffered; + bounds.upperBound = (int)ZSTD_obm_stable; + return bounds; default:; } bounds.error = ERROR(parameter_unsupported); @@ -1398,12 +1433,12 @@ static int ZSTD_dParam_withinBounds(ZSTD_dParameter dParam, int value) } #define CHECK_DBOUNDS(p,v) { \ - RETURN_ERROR_IF(!ZSTD_dParam_withinBounds(p, v), parameter_outOfBound); \ + RETURN_ERROR_IF(!ZSTD_dParam_withinBounds(p, v), parameter_outOfBound, ""); \ } size_t ZSTD_DCtx_setParameter(ZSTD_DCtx* dctx, ZSTD_dParameter dParam, int value) { - RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong); + RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong, ""); switch(dParam) { case ZSTD_d_windowLogMax: if (value == 0) value = ZSTD_WINDOWLOG_LIMIT_DEFAULT; @@ -1414,9 +1449,13 @@ size_t ZSTD_DCtx_setParameter(ZSTD_DCtx* dctx, ZSTD_dParameter dParam, int value CHECK_DBOUNDS(ZSTD_d_format, value); dctx->format = (ZSTD_format_e)value; return 0; + case ZSTD_d_stableOutBuffer: + CHECK_DBOUNDS(ZSTD_d_stableOutBuffer, value); + dctx->outBufferMode = (ZSTD_outBufferMode_e)value; + return 0; default:; } - RETURN_ERROR(parameter_unsupported); + RETURN_ERROR(parameter_unsupported, ""); } size_t ZSTD_DCtx_reset(ZSTD_DCtx* dctx, ZSTD_ResetDirective reset) @@ -1428,7 +1467,7 @@ size_t ZSTD_DCtx_reset(ZSTD_DCtx* dctx, ZSTD_ResetDirective reset) } if ( (reset == ZSTD_reset_parameters) || (reset == ZSTD_reset_session_and_parameters) ) { - RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong); + RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong, ""); ZSTD_clearDict(dctx); dctx->format = ZSTD_f_zstd1; dctx->maxWindowSize = ZSTD_MAXWINDOWSIZE_DEFAULT; @@ -1449,7 +1488,7 @@ size_t ZSTD_decodingBufferSize_min(unsigned long long windowSize, unsigned long unsigned long long const neededSize = MIN(frameContentSize, neededRBSize); size_t const minRBSize = (size_t) neededSize; RETURN_ERROR_IF((unsigned long long)minRBSize != neededSize, - frameParameter_windowTooLarge); + frameParameter_windowTooLarge, ""); return minRBSize; } @@ -1467,30 +1506,94 @@ size_t ZSTD_estimateDStreamSize_fromFrame(const void* src, size_t srcSize) ZSTD_frameHeader zfh; size_t const err = ZSTD_getFrameHeader(&zfh, src, srcSize); if (ZSTD_isError(err)) return err; - RETURN_ERROR_IF(err>0, srcSize_wrong); + RETURN_ERROR_IF(err>0, srcSize_wrong, ""); RETURN_ERROR_IF(zfh.windowSize > windowSizeMax, - frameParameter_windowTooLarge); + frameParameter_windowTooLarge, ""); return ZSTD_estimateDStreamSize((size_t)zfh.windowSize); } /* ***** Decompression ***** */ -MEM_STATIC size_t ZSTD_limitCopy(void* dst, size_t dstCapacity, const void* src, size_t srcSize) +static int ZSTD_DCtx_isOverflow(ZSTD_DStream* zds, size_t const neededInBuffSize, size_t const neededOutBuffSize) { - size_t const length = MIN(dstCapacity, srcSize); - memcpy(dst, src, length); - return length; + return (zds->inBuffSize + zds->outBuffSize) >= (neededInBuffSize + neededOutBuffSize) * ZSTD_WORKSPACETOOLARGE_FACTOR; +} + +static void ZSTD_DCtx_updateOversizedDuration(ZSTD_DStream* zds, size_t const neededInBuffSize, size_t const neededOutBuffSize) +{ + if (ZSTD_DCtx_isOverflow(zds, neededInBuffSize, neededOutBuffSize)) + zds->oversizedDuration++; + else + zds->oversizedDuration = 0; +} + +static int ZSTD_DCtx_isOversizedTooLong(ZSTD_DStream* zds) +{ + return zds->oversizedDuration >= ZSTD_WORKSPACETOOLARGE_MAXDURATION; +} + +/* Checks that the output buffer hasn't changed if ZSTD_obm_stable is used. */ +static size_t ZSTD_checkOutBuffer(ZSTD_DStream const* zds, ZSTD_outBuffer const* output) +{ + ZSTD_outBuffer const expect = zds->expectedOutBuffer; + /* No requirement when ZSTD_obm_stable is not enabled. */ + if (zds->outBufferMode != ZSTD_obm_stable) + return 0; + /* Any buffer is allowed in zdss_init, this must be the same for every other call until + * the context is reset. + */ + if (zds->streamStage == zdss_init) + return 0; + /* The buffer must match our expectation exactly. */ + if (expect.dst == output->dst && expect.pos == output->pos && expect.size == output->size) + return 0; + RETURN_ERROR(dstBuffer_wrong, "ZSTD_obm_stable enabled but output differs!"); } +/* Calls ZSTD_decompressContinue() with the right parameters for ZSTD_decompressStream() + * and updates the stage and the output buffer state. This call is extracted so it can be + * used both when reading directly from the ZSTD_inBuffer, and in buffered input mode. + * NOTE: You must break after calling this function since the streamStage is modified. + */ +static size_t ZSTD_decompressContinueStream( + ZSTD_DStream* zds, char** op, char* oend, + void const* src, size_t srcSize) { + int const isSkipFrame = ZSTD_isSkipFrame(zds); + if (zds->outBufferMode == ZSTD_obm_buffered) { + size_t const dstSize = isSkipFrame ? 0 : zds->outBuffSize - zds->outStart; + size_t const decodedSize = ZSTD_decompressContinue(zds, + zds->outBuff + zds->outStart, dstSize, src, srcSize); + FORWARD_IF_ERROR(decodedSize, ""); + if (!decodedSize && !isSkipFrame) { + zds->streamStage = zdss_read; + } else { + zds->outEnd = zds->outStart + decodedSize; + zds->streamStage = zdss_flush; + } + } else { + /* Write directly into the output buffer */ + size_t const dstSize = isSkipFrame ? 0 : oend - *op; + size_t const decodedSize = ZSTD_decompressContinue(zds, *op, dstSize, src, srcSize); + FORWARD_IF_ERROR(decodedSize, ""); + *op += decodedSize; + /* Flushing is not needed. */ + zds->streamStage = zdss_read; + assert(*op <= oend); + assert(zds->outBufferMode == ZSTD_obm_stable); + } + return 0; +} size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inBuffer* input) { - const char* const istart = (const char*)(input->src) + input->pos; - const char* const iend = (const char*)(input->src) + input->size; + const char* const src = (const char*)input->src; + const char* const istart = input->pos != 0 ? src + input->pos : src; + const char* const iend = input->size != 0 ? src + input->size : src; const char* ip = istart; - char* const ostart = (char*)(output->dst) + output->pos; - char* const oend = (char*)(output->dst) + output->size; + char* const dst = (char*)output->dst; + char* const ostart = output->pos != 0 ? dst + output->pos : dst; + char* const oend = output->size != 0 ? dst + output->size : dst; char* op = ostart; U32 someMoreWork = 1; @@ -1506,6 +1609,7 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB "forbidden. out: pos: %u vs size: %u", (U32)output->pos, (U32)output->size); DEBUGLOG(5, "input size : %u", (U32)(input->size - input->pos)); + FORWARD_IF_ERROR(ZSTD_checkOutBuffer(zds, output), ""); while (someMoreWork) { switch(zds->streamStage) @@ -1516,6 +1620,7 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB zds->lhSize = zds->inPos = zds->outStart = zds->outEnd = 0; zds->legacyVersion = 0; zds->hostageByte = 0; + zds->expectedOutBuffer = *output; /* fall-through */ case zdss_loadHeader : @@ -1543,7 +1648,7 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB "legacy support is incompatible with static dctx"); FORWARD_IF_ERROR(ZSTD_initLegacyStream(&zds->legacyContext, zds->previousLegacyVersion, legacyVersion, - dict, dictSize)); + dict, dictSize), ""); zds->legacyVersion = zds->previousLegacyVersion = legacyVersion; { size_t const hint = ZSTD_decompressLegacyStream(zds->legacyContext, legacyVersion, output, input); if (hint==0) zds->streamStage = zdss_init; /* or stay in stage zdss_loadHeader */ @@ -1570,7 +1675,8 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB } } /* check for single-pass mode opportunity */ - if (zds->fParams.frameContentSize && zds->fParams.windowSize /* skippable frame if == 0 */ + if (zds->fParams.frameContentSize != ZSTD_CONTENTSIZE_UNKNOWN + && zds->fParams.frameType != ZSTD_skippableFrame && (U64)(size_t)(oend-op) >= zds->fParams.frameContentSize) { size_t const cSize = ZSTD_findFrameCompressedSize(istart, iend-istart); if (cSize <= (size_t)(iend-istart)) { @@ -1586,15 +1692,23 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB break; } } + /* Check output buffer is large enough for ZSTD_odm_stable. */ + if (zds->outBufferMode == ZSTD_obm_stable + && zds->fParams.frameType != ZSTD_skippableFrame + && zds->fParams.frameContentSize != ZSTD_CONTENTSIZE_UNKNOWN + && (U64)(size_t)(oend-op) < zds->fParams.frameContentSize) { + RETURN_ERROR(dstSize_tooSmall, "ZSTD_obm_stable passed but ZSTD_outBuffer is too small"); + } + /* Consume header (see ZSTDds_decodeFrameHeader) */ DEBUGLOG(4, "Consume header"); - FORWARD_IF_ERROR(ZSTD_decompressBegin_usingDDict(zds, ZSTD_getDDict(zds))); + FORWARD_IF_ERROR(ZSTD_decompressBegin_usingDDict(zds, ZSTD_getDDict(zds)), ""); if ((MEM_readLE32(zds->headerBuffer) & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) { /* skippable frame */ zds->expected = MEM_readLE32(zds->headerBuffer + ZSTD_FRAMEIDSIZE); zds->stage = ZSTDds_skipFrame; } else { - FORWARD_IF_ERROR(ZSTD_decodeFrameHeader(zds, zds->headerBuffer, zds->lhSize)); + FORWARD_IF_ERROR(ZSTD_decodeFrameHeader(zds, zds->headerBuffer, zds->lhSize), ""); zds->expected = ZSTD_blockHeaderSize; zds->stage = ZSTDds_decodeBlockHeader; } @@ -1605,40 +1719,48 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB (U32)(zds->maxWindowSize >> 10) ); zds->fParams.windowSize = MAX(zds->fParams.windowSize, 1U << ZSTD_WINDOWLOG_ABSOLUTEMIN); RETURN_ERROR_IF(zds->fParams.windowSize > zds->maxWindowSize, - frameParameter_windowTooLarge); + frameParameter_windowTooLarge, ""); /* Adapt buffer sizes to frame header instructions */ { size_t const neededInBuffSize = MAX(zds->fParams.blockSizeMax, 4 /* frame checksum */); - size_t const neededOutBuffSize = ZSTD_decodingBufferSize_min(zds->fParams.windowSize, zds->fParams.frameContentSize); - if ((zds->inBuffSize < neededInBuffSize) || (zds->outBuffSize < neededOutBuffSize)) { - size_t const bufferSize = neededInBuffSize + neededOutBuffSize; - DEBUGLOG(4, "inBuff : from %u to %u", - (U32)zds->inBuffSize, (U32)neededInBuffSize); - DEBUGLOG(4, "outBuff : from %u to %u", - (U32)zds->outBuffSize, (U32)neededOutBuffSize); - if (zds->staticSize) { /* static DCtx */ - DEBUGLOG(4, "staticSize : %u", (U32)zds->staticSize); - assert(zds->staticSize >= sizeof(ZSTD_DCtx)); /* controlled at init */ - RETURN_ERROR_IF( - bufferSize > zds->staticSize - sizeof(ZSTD_DCtx), - memory_allocation); - } else { - ZSTD_free(zds->inBuff, zds->customMem); - zds->inBuffSize = 0; - zds->outBuffSize = 0; - zds->inBuff = (char*)ZSTD_malloc(bufferSize, zds->customMem); - RETURN_ERROR_IF(zds->inBuff == NULL, memory_allocation); - } - zds->inBuffSize = neededInBuffSize; - zds->outBuff = zds->inBuff + zds->inBuffSize; - zds->outBuffSize = neededOutBuffSize; - } } + size_t const neededOutBuffSize = zds->outBufferMode == ZSTD_obm_buffered + ? ZSTD_decodingBufferSize_min(zds->fParams.windowSize, zds->fParams.frameContentSize) + : 0; + + ZSTD_DCtx_updateOversizedDuration(zds, neededInBuffSize, neededOutBuffSize); + + { int const tooSmall = (zds->inBuffSize < neededInBuffSize) || (zds->outBuffSize < neededOutBuffSize); + int const tooLarge = ZSTD_DCtx_isOversizedTooLong(zds); + + if (tooSmall || tooLarge) { + size_t const bufferSize = neededInBuffSize + neededOutBuffSize; + DEBUGLOG(4, "inBuff : from %u to %u", + (U32)zds->inBuffSize, (U32)neededInBuffSize); + DEBUGLOG(4, "outBuff : from %u to %u", + (U32)zds->outBuffSize, (U32)neededOutBuffSize); + if (zds->staticSize) { /* static DCtx */ + DEBUGLOG(4, "staticSize : %u", (U32)zds->staticSize); + assert(zds->staticSize >= sizeof(ZSTD_DCtx)); /* controlled at init */ + RETURN_ERROR_IF( + bufferSize > zds->staticSize - sizeof(ZSTD_DCtx), + memory_allocation, ""); + } else { + ZSTD_free(zds->inBuff, zds->customMem); + zds->inBuffSize = 0; + zds->outBuffSize = 0; + zds->inBuff = (char*)ZSTD_malloc(bufferSize, zds->customMem); + RETURN_ERROR_IF(zds->inBuff == NULL, memory_allocation, ""); + } + zds->inBuffSize = neededInBuffSize; + zds->outBuff = zds->inBuff + zds->inBuffSize; + zds->outBuffSize = neededOutBuffSize; + } } } zds->streamStage = zdss_read; /* fall-through */ case zdss_read: DEBUGLOG(5, "stage zdss_read"); - { size_t const neededInSize = ZSTD_nextSrcSizeToDecompress(zds); + { size_t const neededInSize = ZSTD_nextSrcSizeToDecompressWithInputSize(zds, iend - ip); DEBUGLOG(5, "neededInSize = %u", (U32)neededInSize); if (neededInSize==0) { /* end of frame */ zds->streamStage = zdss_init; @@ -1646,15 +1768,9 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB break; } if ((size_t)(iend-ip) >= neededInSize) { /* decode directly from src */ - int const isSkipFrame = ZSTD_isSkipFrame(zds); - size_t const decodedSize = ZSTD_decompressContinue(zds, - zds->outBuff + zds->outStart, (isSkipFrame ? 0 : zds->outBuffSize - zds->outStart), - ip, neededInSize); - if (ZSTD_isError(decodedSize)) return decodedSize; + FORWARD_IF_ERROR(ZSTD_decompressContinueStream(zds, &op, oend, ip, neededInSize), ""); ip += neededInSize; - if (!decodedSize && !isSkipFrame) break; /* this was just a header */ - zds->outEnd = zds->outStart + decodedSize; - zds->streamStage = zdss_flush; + /* Function modifies the stage so we must break */ break; } } if (ip==iend) { someMoreWork = 0; break; } /* no more input */ @@ -1666,6 +1782,8 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB size_t const toLoad = neededInSize - zds->inPos; int const isSkipFrame = ZSTD_isSkipFrame(zds); size_t loadedSize; + /* At this point we shouldn't be decompressing a block that we can stream. */ + assert(neededInSize == ZSTD_nextSrcSizeToDecompressWithInputSize(zds, iend - ip)); if (isSkipFrame) { loadedSize = MIN(toLoad, (size_t)(iend-ip)); } else { @@ -1679,17 +1797,11 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB if (loadedSize < toLoad) { someMoreWork = 0; break; } /* not enough input, wait for more */ /* decode loaded input */ - { size_t const decodedSize = ZSTD_decompressContinue(zds, - zds->outBuff + zds->outStart, zds->outBuffSize - zds->outStart, - zds->inBuff, neededInSize); - if (ZSTD_isError(decodedSize)) return decodedSize; - zds->inPos = 0; /* input is consumed */ - if (!decodedSize && !isSkipFrame) { zds->streamStage = zdss_read; break; } /* this was just a header */ - zds->outEnd = zds->outStart + decodedSize; - } } - zds->streamStage = zdss_flush; - /* fall-through */ - + zds->inPos = 0; /* input is consumed */ + FORWARD_IF_ERROR(ZSTD_decompressContinueStream(zds, &op, oend, zds->inBuff, neededInSize), ""); + /* Function modifies the stage so we must break */ + break; + } case zdss_flush: { size_t const toFlushSize = zds->outEnd - zds->outStart; size_t const flushedSize = ZSTD_limitCopy(op, oend-op, zds->outBuff + zds->outStart, toFlushSize); @@ -1712,17 +1824,21 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB default: assert(0); /* impossible */ - RETURN_ERROR(GENERIC); /* some compiler require default to do something */ + RETURN_ERROR(GENERIC, "impossible to reach"); /* some compiler require default to do something */ } } /* result */ input->pos = (size_t)(ip - (const char*)(input->src)); output->pos = (size_t)(op - (char*)(output->dst)); + + /* Update the expected output buffer for ZSTD_obm_stable. */ + zds->expectedOutBuffer = *output; + if ((ip==istart) && (op==ostart)) { /* no forward progress */ zds->noForwardProgress ++; if (zds->noForwardProgress >= ZSTD_NO_FORWARD_PROGRESS_MAX) { - RETURN_ERROR_IF(op==oend, dstSize_tooSmall); - RETURN_ERROR_IF(ip==iend, srcSize_wrong); + RETURN_ERROR_IF(op==oend, dstSize_tooSmall, ""); + RETURN_ERROR_IF(ip==iend, srcSize_wrong, ""); assert(0); } } else { diff --git a/thirdparty/zstd/decompress/zstd_decompress_block.c b/thirdparty/zstd/decompress/zstd_decompress_block.c index 767e5f9a0b..ad3b3d8dbd 100644 --- a/thirdparty/zstd/decompress/zstd_decompress_block.c +++ b/thirdparty/zstd/decompress/zstd_decompress_block.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -15,14 +15,14 @@ * Dependencies *********************************************************/ #include <string.h> /* memcpy, memmove, memset */ -#include "compiler.h" /* prefetch */ -#include "cpu.h" /* bmi2 */ -#include "mem.h" /* low level memory routines */ +#include "../common/compiler.h" /* prefetch */ +#include "../common/cpu.h" /* bmi2 */ +#include "../common/mem.h" /* low level memory routines */ #define FSE_STATIC_LINKING_ONLY -#include "fse.h" +#include "../common/fse.h" #define HUF_STATIC_LINKING_ONLY -#include "huf.h" -#include "zstd_internal.h" +#include "../common/huf.h" +#include "../common/zstd_internal.h" #include "zstd_decompress_internal.h" /* ZSTD_DCtx */ #include "zstd_ddict.h" /* ZSTD_DDictDictContent */ #include "zstd_decompress_block.h" @@ -56,7 +56,7 @@ static void ZSTD_copy4(void* dst, const void* src) { memcpy(dst, src, 4); } size_t ZSTD_getcBlockSize(const void* src, size_t srcSize, blockProperties_t* bpPtr) { - RETURN_ERROR_IF(srcSize < ZSTD_blockHeaderSize, srcSize_wrong); + RETURN_ERROR_IF(srcSize < ZSTD_blockHeaderSize, srcSize_wrong, ""); { U32 const cBlockHeader = MEM_readLE24(src); U32 const cSize = cBlockHeader >> 3; @@ -64,7 +64,7 @@ size_t ZSTD_getcBlockSize(const void* src, size_t srcSize, bpPtr->blockType = (blockType_e)((cBlockHeader >> 1) & 3); bpPtr->origSize = cSize; /* only useful for RLE */ if (bpPtr->blockType == bt_rle) return 1; - RETURN_ERROR_IF(bpPtr->blockType == bt_reserved, corruption_detected); + RETURN_ERROR_IF(bpPtr->blockType == bt_reserved, corruption_detected, ""); return cSize; } } @@ -80,7 +80,7 @@ size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx* dctx, const void* src, size_t srcSize) /* note : srcSize < BLOCKSIZE */ { DEBUGLOG(5, "ZSTD_decodeLiteralsBlock"); - RETURN_ERROR_IF(srcSize < MIN_CBLOCK_SIZE, corruption_detected); + RETURN_ERROR_IF(srcSize < MIN_CBLOCK_SIZE, corruption_detected, ""); { const BYTE* const istart = (const BYTE*) src; symbolEncodingType_e const litEncType = (symbolEncodingType_e)(istart[0] & 3); @@ -89,7 +89,7 @@ size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx* dctx, { case set_repeat: DEBUGLOG(5, "set_repeat flag : re-using stats from previous compressed literals block"); - RETURN_ERROR_IF(dctx->litEntropy==0, dictionary_corrupted); + RETURN_ERROR_IF(dctx->litEntropy==0, dictionary_corrupted, ""); /* fall-through */ case set_compressed: @@ -121,8 +121,8 @@ size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx* dctx, litCSize = (lhc >> 22) + ((size_t)istart[4] << 10); break; } - RETURN_ERROR_IF(litSize > ZSTD_BLOCKSIZE_MAX, corruption_detected); - RETURN_ERROR_IF(litCSize + lhSize > srcSize, corruption_detected); + RETURN_ERROR_IF(litSize > ZSTD_BLOCKSIZE_MAX, corruption_detected, ""); + RETURN_ERROR_IF(litCSize + lhSize > srcSize, corruption_detected, ""); /* prefetch huffman table if cold */ if (dctx->ddictIsCold && (litSize > 768 /* heuristic */)) { @@ -160,7 +160,7 @@ size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx* dctx, } } - RETURN_ERROR_IF(HUF_isError(hufSuccess), corruption_detected); + RETURN_ERROR_IF(HUF_isError(hufSuccess), corruption_detected, ""); dctx->litPtr = dctx->litBuffer; dctx->litSize = litSize; @@ -190,7 +190,7 @@ size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx* dctx, } if (lhSize+litSize+WILDCOPY_OVERLENGTH > srcSize) { /* risk reading beyond src buffer with wildcopy */ - RETURN_ERROR_IF(litSize+lhSize > srcSize, corruption_detected); + RETURN_ERROR_IF(litSize+lhSize > srcSize, corruption_detected, ""); memcpy(dctx->litBuffer, istart+lhSize, litSize); dctx->litPtr = dctx->litBuffer; dctx->litSize = litSize; @@ -222,7 +222,7 @@ size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx* dctx, RETURN_ERROR_IF(srcSize<4, corruption_detected, "srcSize >= MIN_CBLOCK_SIZE == 3; here we need lhSize+1 = 4"); break; } - RETURN_ERROR_IF(litSize > ZSTD_BLOCKSIZE_MAX, corruption_detected); + RETURN_ERROR_IF(litSize > ZSTD_BLOCKSIZE_MAX, corruption_detected, ""); memset(dctx->litBuffer, istart[lhSize], litSize + WILDCOPY_OVERLENGTH); dctx->litPtr = dctx->litBuffer; dctx->litSize = litSize; @@ -440,8 +440,8 @@ static size_t ZSTD_buildSeqTable(ZSTD_seqSymbol* DTableSpace, const ZSTD_seqSymb switch(type) { case set_rle : - RETURN_ERROR_IF(!srcSize, srcSize_wrong); - RETURN_ERROR_IF((*(const BYTE*)src) > max, corruption_detected); + RETURN_ERROR_IF(!srcSize, srcSize_wrong, ""); + RETURN_ERROR_IF((*(const BYTE*)src) > max, corruption_detected, ""); { U32 const symbol = *(const BYTE*)src; U32 const baseline = baseValue[symbol]; U32 const nbBits = nbAdditionalBits[symbol]; @@ -453,7 +453,7 @@ static size_t ZSTD_buildSeqTable(ZSTD_seqSymbol* DTableSpace, const ZSTD_seqSymb *DTablePtr = defaultTable; return 0; case set_repeat: - RETURN_ERROR_IF(!flagRepeatTable, corruption_detected); + RETURN_ERROR_IF(!flagRepeatTable, corruption_detected, ""); /* prefetch FSE table if used */ if (ddictIsCold && (nbSeq > 24 /* heuristic */)) { const void* const pStart = *DTablePtr; @@ -465,8 +465,8 @@ static size_t ZSTD_buildSeqTable(ZSTD_seqSymbol* DTableSpace, const ZSTD_seqSymb { unsigned tableLog; S16 norm[MaxSeq+1]; size_t const headerSize = FSE_readNCount(norm, &max, &tableLog, src, srcSize); - RETURN_ERROR_IF(FSE_isError(headerSize), corruption_detected); - RETURN_ERROR_IF(tableLog > maxLog, corruption_detected); + RETURN_ERROR_IF(FSE_isError(headerSize), corruption_detected, ""); + RETURN_ERROR_IF(tableLog > maxLog, corruption_detected, ""); ZSTD_buildFSETable(DTableSpace, norm, max, baseValue, nbAdditionalBits, tableLog); *DTablePtr = DTableSpace; return headerSize; @@ -487,28 +487,28 @@ size_t ZSTD_decodeSeqHeaders(ZSTD_DCtx* dctx, int* nbSeqPtr, DEBUGLOG(5, "ZSTD_decodeSeqHeaders"); /* check */ - RETURN_ERROR_IF(srcSize < MIN_SEQUENCES_SIZE, srcSize_wrong); + RETURN_ERROR_IF(srcSize < MIN_SEQUENCES_SIZE, srcSize_wrong, ""); /* SeqHead */ nbSeq = *ip++; if (!nbSeq) { *nbSeqPtr=0; - RETURN_ERROR_IF(srcSize != 1, srcSize_wrong); + RETURN_ERROR_IF(srcSize != 1, srcSize_wrong, ""); return 1; } if (nbSeq > 0x7F) { if (nbSeq == 0xFF) { - RETURN_ERROR_IF(ip+2 > iend, srcSize_wrong); + RETURN_ERROR_IF(ip+2 > iend, srcSize_wrong, ""); nbSeq = MEM_readLE16(ip) + LONGNBSEQ, ip+=2; } else { - RETURN_ERROR_IF(ip >= iend, srcSize_wrong); + RETURN_ERROR_IF(ip >= iend, srcSize_wrong, ""); nbSeq = ((nbSeq-0x80)<<8) + *ip++; } } *nbSeqPtr = nbSeq; /* FSE table descriptors */ - RETURN_ERROR_IF(ip+1 > iend, srcSize_wrong); /* minimum possible size: 1 byte for symbol encoding types */ + RETURN_ERROR_IF(ip+1 > iend, srcSize_wrong, ""); /* minimum possible size: 1 byte for symbol encoding types */ { symbolEncodingType_e const LLtype = (symbolEncodingType_e)(*ip >> 6); symbolEncodingType_e const OFtype = (symbolEncodingType_e)((*ip >> 4) & 3); symbolEncodingType_e const MLtype = (symbolEncodingType_e)((*ip >> 2) & 3); @@ -521,7 +521,7 @@ size_t ZSTD_decodeSeqHeaders(ZSTD_DCtx* dctx, int* nbSeqPtr, LL_base, LL_bits, LL_defaultDTable, dctx->fseEntropy, dctx->ddictIsCold, nbSeq); - RETURN_ERROR_IF(ZSTD_isError(llhSize), corruption_detected); + RETURN_ERROR_IF(ZSTD_isError(llhSize), corruption_detected, "ZSTD_buildSeqTable failed"); ip += llhSize; } @@ -531,7 +531,7 @@ size_t ZSTD_decodeSeqHeaders(ZSTD_DCtx* dctx, int* nbSeqPtr, OF_base, OF_bits, OF_defaultDTable, dctx->fseEntropy, dctx->ddictIsCold, nbSeq); - RETURN_ERROR_IF(ZSTD_isError(ofhSize), corruption_detected); + RETURN_ERROR_IF(ZSTD_isError(ofhSize), corruption_detected, "ZSTD_buildSeqTable failed"); ip += ofhSize; } @@ -541,7 +541,7 @@ size_t ZSTD_decodeSeqHeaders(ZSTD_DCtx* dctx, int* nbSeqPtr, ML_base, ML_bits, ML_defaultDTable, dctx->fseEntropy, dctx->ddictIsCold, nbSeq); - RETURN_ERROR_IF(ZSTD_isError(mlhSize), corruption_detected); + RETURN_ERROR_IF(ZSTD_isError(mlhSize), corruption_detected, "ZSTD_buildSeqTable failed"); ip += mlhSize; } } @@ -580,7 +580,7 @@ typedef struct { * Precondition: *ip <= *op * Postcondition: *op - *op >= 8 */ -static void ZSTD_overlapCopy8(BYTE** op, BYTE const** ip, size_t offset) { +HINT_INLINE void ZSTD_overlapCopy8(BYTE** op, BYTE const** ip, size_t offset) { assert(*ip <= *op); if (offset < 8) { /* close range match, overlap */ @@ -665,15 +665,15 @@ size_t ZSTD_execSequenceEnd(BYTE* op, { BYTE* const oLitEnd = op + sequence.litLength; size_t const sequenceLength = sequence.litLength + sequence.matchLength; - BYTE* const oMatchEnd = op + sequenceLength; /* risk : address space overflow (32-bits) */ const BYTE* const iLitEnd = *litPtr + sequence.litLength; const BYTE* match = oLitEnd - sequence.offset; BYTE* const oend_w = oend - WILDCOPY_OVERLENGTH; - /* bounds checks */ - assert(oLitEnd < oMatchEnd); - RETURN_ERROR_IF(oMatchEnd > oend, dstSize_tooSmall, "last match must fit within dstBuffer"); - RETURN_ERROR_IF(iLitEnd > litLimit, corruption_detected, "try to read beyond literal buffer"); + /* bounds checks : careful of address space overflow in 32-bit mode */ + RETURN_ERROR_IF(sequenceLength > (size_t)(oend - op), dstSize_tooSmall, "last match must fit within dstBuffer"); + RETURN_ERROR_IF(sequence.litLength > (size_t)(litLimit - *litPtr), corruption_detected, "try to read beyond literal buffer"); + assert(op < op + sequenceLength); + assert(oLitEnd < op + sequenceLength); /* copy literals */ ZSTD_safecopy(op, oend_w, *litPtr, sequence.litLength, ZSTD_no_overlap); @@ -683,7 +683,7 @@ size_t ZSTD_execSequenceEnd(BYTE* op, /* copy Match */ if (sequence.offset > (size_t)(oLitEnd - prefixStart)) { /* offset beyond prefix */ - RETURN_ERROR_IF(sequence.offset > (size_t)(oLitEnd - virtualStart), corruption_detected); + RETURN_ERROR_IF(sequence.offset > (size_t)(oLitEnd - virtualStart), corruption_detected, ""); match = dictEnd - (prefixStart-match); if (match + sequence.matchLength <= dictEnd) { memmove(oLitEnd, match, sequence.matchLength); @@ -709,16 +709,27 @@ size_t ZSTD_execSequence(BYTE* op, BYTE* const oLitEnd = op + sequence.litLength; size_t const sequenceLength = sequence.litLength + sequence.matchLength; BYTE* const oMatchEnd = op + sequenceLength; /* risk : address space overflow (32-bits) */ - BYTE* const oend_w = oend - WILDCOPY_OVERLENGTH; + BYTE* const oend_w = oend - WILDCOPY_OVERLENGTH; /* risk : address space underflow on oend=NULL */ const BYTE* const iLitEnd = *litPtr + sequence.litLength; const BYTE* match = oLitEnd - sequence.offset; - /* Errors and uncommon cases handled here. */ - assert(oLitEnd < oMatchEnd); - if (iLitEnd > litLimit || oMatchEnd > oend_w) + assert(op != NULL /* Precondition */); + assert(oend_w < oend /* No underflow */); + /* Handle edge cases in a slow path: + * - Read beyond end of literals + * - Match end is within WILDCOPY_OVERLIMIT of oend + * - 32-bit mode and the match length overflows + */ + if (UNLIKELY( + iLitEnd > litLimit || + oMatchEnd > oend_w || + (MEM_32bits() && (size_t)(oend - op) < sequenceLength + WILDCOPY_OVERLENGTH))) return ZSTD_execSequenceEnd(op, oend, sequence, litPtr, litLimit, prefixStart, virtualStart, dictEnd); /* Assumptions (everything else goes into ZSTD_execSequenceEnd()) */ + assert(op <= oLitEnd /* No overflow */); + assert(oLitEnd < oMatchEnd /* Non-zero match & no overflow */); + assert(oMatchEnd <= oend /* No underflow */); assert(iLitEnd <= litLimit /* Literal length is in bounds */); assert(oLitEnd <= oend_w /* Can wildcopy literals */); assert(oMatchEnd <= oend_w /* Can wildcopy matches */); @@ -729,7 +740,7 @@ size_t ZSTD_execSequence(BYTE* op, */ assert(WILDCOPY_OVERLENGTH >= 16); ZSTD_copy16(op, (*litPtr)); - if (sequence.litLength > 16) { + if (UNLIKELY(sequence.litLength > 16)) { ZSTD_wildcopy(op+16, (*litPtr)+16, sequence.litLength-16, ZSTD_no_overlap); } op = oLitEnd; @@ -738,7 +749,7 @@ size_t ZSTD_execSequence(BYTE* op, /* Copy Match */ if (sequence.offset > (size_t)(oLitEnd - prefixStart)) { /* offset beyond prefix -> go into extDict */ - RETURN_ERROR_IF(sequence.offset > (size_t)(oLitEnd - virtualStart), corruption_detected); + RETURN_ERROR_IF(UNLIKELY(sequence.offset > (size_t)(oLitEnd - virtualStart)), corruption_detected, ""); match = dictEnd + (match - prefixStart); if (match + sequence.matchLength <= dictEnd) { memmove(oLitEnd, match, sequence.matchLength); @@ -760,7 +771,7 @@ size_t ZSTD_execSequence(BYTE* op, /* Nearly all offsets are >= WILDCOPY_VECLEN bytes, which means we can use wildcopy * without overlap checking. */ - if (sequence.offset >= WILDCOPY_VECLEN) { + if (LIKELY(sequence.offset >= WILDCOPY_VECLEN)) { /* We bet on a full wildcopy for matches, since we expect matches to be * longer than literals (in general). In silesia, ~10% of matches are longer * than 16 bytes. @@ -802,6 +813,14 @@ ZSTD_updateFseState(ZSTD_fseState* DStatePtr, BIT_DStream_t* bitD) DStatePtr->state = DInfo.nextState + lowBits; } +FORCE_INLINE_TEMPLATE void +ZSTD_updateFseStateWithDInfo(ZSTD_fseState* DStatePtr, BIT_DStream_t* bitD, ZSTD_seqSymbol const DInfo) +{ + U32 const nbBits = DInfo.nbBits; + size_t const lowBits = BIT_readBits(bitD, nbBits); + DStatePtr->state = DInfo.nextState + lowBits; +} + /* We need to add at most (ZSTD_WINDOWLOG_MAX_32 - 1) bits to read the maximum * offset bits. But we can only read at most (STREAM_ACCUMULATOR_MIN_32 - 1) * bits before reloading. This value is the maximum number of bytes we read @@ -813,25 +832,26 @@ ZSTD_updateFseState(ZSTD_fseState* DStatePtr, BIT_DStream_t* bitD) : 0) typedef enum { ZSTD_lo_isRegularOffset, ZSTD_lo_isLongOffset=1 } ZSTD_longOffset_e; +typedef enum { ZSTD_p_noPrefetch=0, ZSTD_p_prefetch=1 } ZSTD_prefetch_e; -#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG FORCE_INLINE_TEMPLATE seq_t -ZSTD_decodeSequence(seqState_t* seqState, const ZSTD_longOffset_e longOffsets) +ZSTD_decodeSequence(seqState_t* seqState, const ZSTD_longOffset_e longOffsets, const ZSTD_prefetch_e prefetch) { seq_t seq; - U32 const llBits = seqState->stateLL.table[seqState->stateLL.state].nbAdditionalBits; - U32 const mlBits = seqState->stateML.table[seqState->stateML.state].nbAdditionalBits; - U32 const ofBits = seqState->stateOffb.table[seqState->stateOffb.state].nbAdditionalBits; - U32 const totalBits = llBits+mlBits+ofBits; - U32 const llBase = seqState->stateLL.table[seqState->stateLL.state].baseValue; - U32 const mlBase = seqState->stateML.table[seqState->stateML.state].baseValue; - U32 const ofBase = seqState->stateOffb.table[seqState->stateOffb.state].baseValue; + ZSTD_seqSymbol const llDInfo = seqState->stateLL.table[seqState->stateLL.state]; + ZSTD_seqSymbol const mlDInfo = seqState->stateML.table[seqState->stateML.state]; + ZSTD_seqSymbol const ofDInfo = seqState->stateOffb.table[seqState->stateOffb.state]; + U32 const llBase = llDInfo.baseValue; + U32 const mlBase = mlDInfo.baseValue; + U32 const ofBase = ofDInfo.baseValue; + BYTE const llBits = llDInfo.nbAdditionalBits; + BYTE const mlBits = mlDInfo.nbAdditionalBits; + BYTE const ofBits = ofDInfo.nbAdditionalBits; + BYTE const totalBits = llBits+mlBits+ofBits; /* sequence */ { size_t offset; - if (!ofBits) - offset = 0; - else { + if (ofBits > 1) { ZSTD_STATIC_ASSERT(ZSTD_lo_isLongOffset == 1); ZSTD_STATIC_ASSERT(LONG_OFFSETS_MAX_EXTRA_BITS_32 == 5); assert(ofBits <= MaxOff); @@ -845,59 +865,138 @@ ZSTD_decodeSequence(seqState_t* seqState, const ZSTD_longOffset_e longOffsets) offset = ofBase + BIT_readBitsFast(&seqState->DStream, ofBits/*>0*/); /* <= (ZSTD_WINDOWLOG_MAX-1) bits */ if (MEM_32bits()) BIT_reloadDStream(&seqState->DStream); } - } - - if (ofBits <= 1) { - offset += (llBase==0); - if (offset) { - size_t temp = (offset==3) ? seqState->prevOffset[0] - 1 : seqState->prevOffset[offset]; - temp += !temp; /* 0 is not valid; input is corrupted; force offset to 1 */ - if (offset != 1) seqState->prevOffset[2] = seqState->prevOffset[1]; - seqState->prevOffset[1] = seqState->prevOffset[0]; - seqState->prevOffset[0] = offset = temp; - } else { /* offset == 0 */ - offset = seqState->prevOffset[0]; - } - } else { seqState->prevOffset[2] = seqState->prevOffset[1]; seqState->prevOffset[1] = seqState->prevOffset[0]; seqState->prevOffset[0] = offset; - } + } else { + U32 const ll0 = (llBase == 0); + if (LIKELY((ofBits == 0))) { + if (LIKELY(!ll0)) + offset = seqState->prevOffset[0]; + else { + offset = seqState->prevOffset[1]; + seqState->prevOffset[1] = seqState->prevOffset[0]; + seqState->prevOffset[0] = offset; + } + } else { + offset = ofBase + ll0 + BIT_readBitsFast(&seqState->DStream, 1); + { size_t temp = (offset==3) ? seqState->prevOffset[0] - 1 : seqState->prevOffset[offset]; + temp += !temp; /* 0 is not valid; input is corrupted; force offset to 1 */ + if (offset != 1) seqState->prevOffset[2] = seqState->prevOffset[1]; + seqState->prevOffset[1] = seqState->prevOffset[0]; + seqState->prevOffset[0] = offset = temp; + } } } seq.offset = offset; } - seq.matchLength = mlBase - + ((mlBits>0) ? BIT_readBitsFast(&seqState->DStream, mlBits/*>0*/) : 0); /* <= 16 bits */ + seq.matchLength = mlBase; + if (mlBits > 0) + seq.matchLength += BIT_readBitsFast(&seqState->DStream, mlBits/*>0*/); + if (MEM_32bits() && (mlBits+llBits >= STREAM_ACCUMULATOR_MIN_32-LONG_OFFSETS_MAX_EXTRA_BITS_32)) BIT_reloadDStream(&seqState->DStream); - if (MEM_64bits() && (totalBits >= STREAM_ACCUMULATOR_MIN_64-(LLFSELog+MLFSELog+OffFSELog))) + if (MEM_64bits() && UNLIKELY(totalBits >= STREAM_ACCUMULATOR_MIN_64-(LLFSELog+MLFSELog+OffFSELog))) BIT_reloadDStream(&seqState->DStream); /* Ensure there are enough bits to read the rest of data in 64-bit mode. */ ZSTD_STATIC_ASSERT(16+LLFSELog+MLFSELog+OffFSELog < STREAM_ACCUMULATOR_MIN_64); - seq.litLength = llBase - + ((llBits>0) ? BIT_readBitsFast(&seqState->DStream, llBits/*>0*/) : 0); /* <= 16 bits */ + seq.litLength = llBase; + if (llBits > 0) + seq.litLength += BIT_readBitsFast(&seqState->DStream, llBits/*>0*/); + if (MEM_32bits()) BIT_reloadDStream(&seqState->DStream); DEBUGLOG(6, "seq: litL=%u, matchL=%u, offset=%u", (U32)seq.litLength, (U32)seq.matchLength, (U32)seq.offset); - /* ANS state update */ - ZSTD_updateFseState(&seqState->stateLL, &seqState->DStream); /* <= 9 bits */ - ZSTD_updateFseState(&seqState->stateML, &seqState->DStream); /* <= 9 bits */ - if (MEM_32bits()) BIT_reloadDStream(&seqState->DStream); /* <= 18 bits */ - ZSTD_updateFseState(&seqState->stateOffb, &seqState->DStream); /* <= 8 bits */ + if (prefetch == ZSTD_p_prefetch) { + size_t const pos = seqState->pos + seq.litLength; + const BYTE* const matchBase = (seq.offset > pos) ? seqState->dictEnd : seqState->prefixStart; + seq.match = matchBase + pos - seq.offset; /* note : this operation can overflow when seq.offset is really too large, which can only happen when input is corrupted. + * No consequence though : no memory access will occur, offset is only used for prefetching */ + seqState->pos = pos + seq.matchLength; + } + + /* ANS state update + * gcc-9.0.0 does 2.5% worse with ZSTD_updateFseStateWithDInfo(). + * clang-9.2.0 does 7% worse with ZSTD_updateFseState(). + * Naturally it seems like ZSTD_updateFseStateWithDInfo() should be the + * better option, so it is the default for other compilers. But, if you + * measure that it is worse, please put up a pull request. + */ + { +#if defined(__GNUC__) && !defined(__clang__) + const int kUseUpdateFseState = 1; +#else + const int kUseUpdateFseState = 0; +#endif + if (kUseUpdateFseState) { + ZSTD_updateFseState(&seqState->stateLL, &seqState->DStream); /* <= 9 bits */ + ZSTD_updateFseState(&seqState->stateML, &seqState->DStream); /* <= 9 bits */ + if (MEM_32bits()) BIT_reloadDStream(&seqState->DStream); /* <= 18 bits */ + ZSTD_updateFseState(&seqState->stateOffb, &seqState->DStream); /* <= 8 bits */ + } else { + ZSTD_updateFseStateWithDInfo(&seqState->stateLL, &seqState->DStream, llDInfo); /* <= 9 bits */ + ZSTD_updateFseStateWithDInfo(&seqState->stateML, &seqState->DStream, mlDInfo); /* <= 9 bits */ + if (MEM_32bits()) BIT_reloadDStream(&seqState->DStream); /* <= 18 bits */ + ZSTD_updateFseStateWithDInfo(&seqState->stateOffb, &seqState->DStream, ofDInfo); /* <= 8 bits */ + } + } return seq; } +#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION +static int ZSTD_dictionaryIsActive(ZSTD_DCtx const* dctx, BYTE const* prefixStart, BYTE const* oLitEnd) +{ + size_t const windowSize = dctx->fParams.windowSize; + /* No dictionary used. */ + if (dctx->dictContentEndForFuzzing == NULL) return 0; + /* Dictionary is our prefix. */ + if (prefixStart == dctx->dictContentBeginForFuzzing) return 1; + /* Dictionary is not our ext-dict. */ + if (dctx->dictEnd != dctx->dictContentEndForFuzzing) return 0; + /* Dictionary is not within our window size. */ + if ((size_t)(oLitEnd - prefixStart) >= windowSize) return 0; + /* Dictionary is active. */ + return 1; +} + +MEM_STATIC void ZSTD_assertValidSequence( + ZSTD_DCtx const* dctx, + BYTE const* op, BYTE const* oend, + seq_t const seq, + BYTE const* prefixStart, BYTE const* virtualStart) +{ + size_t const windowSize = dctx->fParams.windowSize; + size_t const sequenceSize = seq.litLength + seq.matchLength; + BYTE const* const oLitEnd = op + seq.litLength; + DEBUGLOG(6, "Checking sequence: litL=%u matchL=%u offset=%u", + (U32)seq.litLength, (U32)seq.matchLength, (U32)seq.offset); + assert(op <= oend); + assert((size_t)(oend - op) >= sequenceSize); + assert(sequenceSize <= ZSTD_BLOCKSIZE_MAX); + if (ZSTD_dictionaryIsActive(dctx, prefixStart, oLitEnd)) { + size_t const dictSize = (size_t)((char const*)dctx->dictContentEndForFuzzing - (char const*)dctx->dictContentBeginForFuzzing); + /* Offset must be within the dictionary. */ + assert(seq.offset <= (size_t)(oLitEnd - virtualStart)); + assert(seq.offset <= windowSize + dictSize); + } else { + /* Offset must be within our window. */ + assert(seq.offset <= windowSize); + } +} +#endif + +#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG FORCE_INLINE_TEMPLATE size_t DONT_VECTORIZE ZSTD_decompressSequences_body( ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) + const ZSTD_longOffset_e isLongOffset, + const int frame) { const BYTE* ip = (const BYTE*)seqStart; const BYTE* const iend = ip + seqSize; @@ -910,46 +1009,104 @@ ZSTD_decompressSequences_body( ZSTD_DCtx* dctx, const BYTE* const vBase = (const BYTE*) (dctx->virtualStart); const BYTE* const dictEnd = (const BYTE*) (dctx->dictEnd); DEBUGLOG(5, "ZSTD_decompressSequences_body"); + (void)frame; /* Regen sequences */ if (nbSeq) { seqState_t seqState; + size_t error = 0; dctx->fseEntropy = 1; { U32 i; for (i=0; i<ZSTD_REP_NUM; i++) seqState.prevOffset[i] = dctx->entropy.rep[i]; } RETURN_ERROR_IF( ERR_isError(BIT_initDStream(&seqState.DStream, ip, iend-ip)), - corruption_detected); + corruption_detected, ""); ZSTD_initFseState(&seqState.stateLL, &seqState.DStream, dctx->LLTptr); ZSTD_initFseState(&seqState.stateOffb, &seqState.DStream, dctx->OFTptr); ZSTD_initFseState(&seqState.stateML, &seqState.DStream, dctx->MLTptr); + assert(dst != NULL); ZSTD_STATIC_ASSERT( BIT_DStream_unfinished < BIT_DStream_completed && BIT_DStream_endOfBuffer < BIT_DStream_completed && BIT_DStream_completed < BIT_DStream_overflow); - for ( ; (BIT_reloadDStream(&(seqState.DStream)) <= BIT_DStream_completed) && nbSeq ; ) { - nbSeq--; - { seq_t const sequence = ZSTD_decodeSequence(&seqState, isLongOffset); - size_t const oneSeqSize = ZSTD_execSequence(op, oend, sequence, &litPtr, litEnd, prefixStart, vBase, dictEnd); - DEBUGLOG(6, "regenerated sequence size : %u", (U32)oneSeqSize); - if (ZSTD_isError(oneSeqSize)) return oneSeqSize; - op += oneSeqSize; - } } +#if defined(__GNUC__) && defined(__x86_64__) + /* Align the decompression loop to 32 + 16 bytes. + * + * zstd compiled with gcc-9 on an Intel i9-9900k shows 10% decompression + * speed swings based on the alignment of the decompression loop. This + * performance swing is caused by parts of the decompression loop falling + * out of the DSB. The entire decompression loop should fit in the DSB, + * when it can't we get much worse performance. You can measure if you've + * hit the good case or the bad case with this perf command for some + * compressed file test.zst: + * + * perf stat -e cycles -e instructions -e idq.all_dsb_cycles_any_uops \ + * -e idq.all_mite_cycles_any_uops -- ./zstd -tq test.zst + * + * If you see most cycles served out of the MITE you've hit the bad case. + * If you see most cycles served out of the DSB you've hit the good case. + * If it is pretty even then you may be in an okay case. + * + * I've been able to reproduce this issue on the following CPUs: + * - Kabylake: Macbook Pro (15-inch, 2019) 2.4 GHz Intel Core i9 + * Use Instruments->Counters to get DSB/MITE cycles. + * I never got performance swings, but I was able to + * go from the good case of mostly DSB to half of the + * cycles served from MITE. + * - Coffeelake: Intel i9-9900k + * + * I haven't been able to reproduce the instability or DSB misses on any + * of the following CPUS: + * - Haswell + * - Broadwell: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GH + * - Skylake + * + * If you are seeing performance stability this script can help test. + * It tests on 4 commits in zstd where I saw performance change. + * + * https://gist.github.com/terrelln/9889fc06a423fd5ca6e99351564473f4 + */ + __asm__(".p2align 5"); + __asm__("nop"); + __asm__(".p2align 4"); +#endif + for ( ; ; ) { + seq_t const sequence = ZSTD_decodeSequence(&seqState, isLongOffset, ZSTD_p_noPrefetch); + size_t const oneSeqSize = ZSTD_execSequence(op, oend, sequence, &litPtr, litEnd, prefixStart, vBase, dictEnd); +#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) + assert(!ZSTD_isError(oneSeqSize)); + if (frame) ZSTD_assertValidSequence(dctx, op, oend, sequence, prefixStart, vBase); +#endif + DEBUGLOG(6, "regenerated sequence size : %u", (U32)oneSeqSize); + BIT_reloadDStream(&(seqState.DStream)); + /* gcc and clang both don't like early returns in this loop. + * gcc doesn't like early breaks either. + * Instead save an error and report it at the end. + * When there is an error, don't increment op, so we don't + * overwrite. + */ + if (UNLIKELY(ZSTD_isError(oneSeqSize))) error = oneSeqSize; + else op += oneSeqSize; + if (UNLIKELY(!--nbSeq)) break; + } /* check if reached exact end */ DEBUGLOG(5, "ZSTD_decompressSequences_body: after decode loop, remaining nbSeq : %i", nbSeq); - RETURN_ERROR_IF(nbSeq, corruption_detected); - RETURN_ERROR_IF(BIT_reloadDStream(&seqState.DStream) < BIT_DStream_completed, corruption_detected); + if (ZSTD_isError(error)) return error; + RETURN_ERROR_IF(nbSeq, corruption_detected, ""); + RETURN_ERROR_IF(BIT_reloadDStream(&seqState.DStream) < BIT_DStream_completed, corruption_detected, ""); /* save reps for next block */ { U32 i; for (i=0; i<ZSTD_REP_NUM; i++) dctx->entropy.rep[i] = (U32)(seqState.prevOffset[i]); } } /* last literal segment */ { size_t const lastLLSize = litEnd - litPtr; - RETURN_ERROR_IF(lastLLSize > (size_t)(oend-op), dstSize_tooSmall); - memcpy(op, litPtr, lastLLSize); - op += lastLLSize; + RETURN_ERROR_IF(lastLLSize > (size_t)(oend-op), dstSize_tooSmall, ""); + if (op != NULL) { + memcpy(op, litPtr, lastLLSize); + op += lastLLSize; + } } return op-ostart; @@ -959,99 +1116,21 @@ static size_t ZSTD_decompressSequences_default(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) + const ZSTD_longOffset_e isLongOffset, + const int frame) { - return ZSTD_decompressSequences_body(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); + return ZSTD_decompressSequences_body(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset, frame); } #endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG */ - - #ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT -FORCE_INLINE_TEMPLATE seq_t -ZSTD_decodeSequenceLong(seqState_t* seqState, ZSTD_longOffset_e const longOffsets) -{ - seq_t seq; - U32 const llBits = seqState->stateLL.table[seqState->stateLL.state].nbAdditionalBits; - U32 const mlBits = seqState->stateML.table[seqState->stateML.state].nbAdditionalBits; - U32 const ofBits = seqState->stateOffb.table[seqState->stateOffb.state].nbAdditionalBits; - U32 const totalBits = llBits+mlBits+ofBits; - U32 const llBase = seqState->stateLL.table[seqState->stateLL.state].baseValue; - U32 const mlBase = seqState->stateML.table[seqState->stateML.state].baseValue; - U32 const ofBase = seqState->stateOffb.table[seqState->stateOffb.state].baseValue; - - /* sequence */ - { size_t offset; - if (!ofBits) - offset = 0; - else { - ZSTD_STATIC_ASSERT(ZSTD_lo_isLongOffset == 1); - ZSTD_STATIC_ASSERT(LONG_OFFSETS_MAX_EXTRA_BITS_32 == 5); - assert(ofBits <= MaxOff); - if (MEM_32bits() && longOffsets) { - U32 const extraBits = ofBits - MIN(ofBits, STREAM_ACCUMULATOR_MIN_32-1); - offset = ofBase + (BIT_readBitsFast(&seqState->DStream, ofBits - extraBits) << extraBits); - if (MEM_32bits() || extraBits) BIT_reloadDStream(&seqState->DStream); - if (extraBits) offset += BIT_readBitsFast(&seqState->DStream, extraBits); - } else { - offset = ofBase + BIT_readBitsFast(&seqState->DStream, ofBits); /* <= (ZSTD_WINDOWLOG_MAX-1) bits */ - if (MEM_32bits()) BIT_reloadDStream(&seqState->DStream); - } - } - - if (ofBits <= 1) { - offset += (llBase==0); - if (offset) { - size_t temp = (offset==3) ? seqState->prevOffset[0] - 1 : seqState->prevOffset[offset]; - temp += !temp; /* 0 is not valid; input is corrupted; force offset to 1 */ - if (offset != 1) seqState->prevOffset[2] = seqState->prevOffset[1]; - seqState->prevOffset[1] = seqState->prevOffset[0]; - seqState->prevOffset[0] = offset = temp; - } else { - offset = seqState->prevOffset[0]; - } - } else { - seqState->prevOffset[2] = seqState->prevOffset[1]; - seqState->prevOffset[1] = seqState->prevOffset[0]; - seqState->prevOffset[0] = offset; - } - seq.offset = offset; - } - - seq.matchLength = mlBase + ((mlBits>0) ? BIT_readBitsFast(&seqState->DStream, mlBits) : 0); /* <= 16 bits */ - if (MEM_32bits() && (mlBits+llBits >= STREAM_ACCUMULATOR_MIN_32-LONG_OFFSETS_MAX_EXTRA_BITS_32)) - BIT_reloadDStream(&seqState->DStream); - if (MEM_64bits() && (totalBits >= STREAM_ACCUMULATOR_MIN_64-(LLFSELog+MLFSELog+OffFSELog))) - BIT_reloadDStream(&seqState->DStream); - /* Verify that there is enough bits to read the rest of the data in 64-bit mode. */ - ZSTD_STATIC_ASSERT(16+LLFSELog+MLFSELog+OffFSELog < STREAM_ACCUMULATOR_MIN_64); - - seq.litLength = llBase + ((llBits>0) ? BIT_readBitsFast(&seqState->DStream, llBits) : 0); /* <= 16 bits */ - if (MEM_32bits()) - BIT_reloadDStream(&seqState->DStream); - - { size_t const pos = seqState->pos + seq.litLength; - const BYTE* const matchBase = (seq.offset > pos) ? seqState->dictEnd : seqState->prefixStart; - seq.match = matchBase + pos - seq.offset; /* note : this operation can overflow when seq.offset is really too large, which can only happen when input is corrupted. - * No consequence though : no memory access will occur, overly large offset will be detected in ZSTD_execSequenceLong() */ - seqState->pos = pos + seq.matchLength; - } - - /* ANS state update */ - ZSTD_updateFseState(&seqState->stateLL, &seqState->DStream); /* <= 9 bits */ - ZSTD_updateFseState(&seqState->stateML, &seqState->DStream); /* <= 9 bits */ - if (MEM_32bits()) BIT_reloadDStream(&seqState->DStream); /* <= 18 bits */ - ZSTD_updateFseState(&seqState->stateOffb, &seqState->DStream); /* <= 8 bits */ - - return seq; -} - FORCE_INLINE_TEMPLATE size_t ZSTD_decompressSequencesLong_body( ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) + const ZSTD_longOffset_e isLongOffset, + const int frame) { const BYTE* ip = (const BYTE*)seqStart; const BYTE* const iend = ip + seqSize; @@ -1063,6 +1142,7 @@ ZSTD_decompressSequencesLong_body( const BYTE* const prefixStart = (const BYTE*) (dctx->prefixStart); const BYTE* const dictStart = (const BYTE*) (dctx->virtualStart); const BYTE* const dictEnd = (const BYTE*) (dctx->dictEnd); + (void)frame; /* Regen sequences */ if (nbSeq) { @@ -1078,36 +1158,45 @@ ZSTD_decompressSequencesLong_body( seqState.prefixStart = prefixStart; seqState.pos = (size_t)(op-prefixStart); seqState.dictEnd = dictEnd; + assert(dst != NULL); assert(iend >= ip); RETURN_ERROR_IF( ERR_isError(BIT_initDStream(&seqState.DStream, ip, iend-ip)), - corruption_detected); + corruption_detected, ""); ZSTD_initFseState(&seqState.stateLL, &seqState.DStream, dctx->LLTptr); ZSTD_initFseState(&seqState.stateOffb, &seqState.DStream, dctx->OFTptr); ZSTD_initFseState(&seqState.stateML, &seqState.DStream, dctx->MLTptr); /* prepare in advance */ for (seqNb=0; (BIT_reloadDStream(&seqState.DStream) <= BIT_DStream_completed) && (seqNb<seqAdvance); seqNb++) { - sequences[seqNb] = ZSTD_decodeSequenceLong(&seqState, isLongOffset); + sequences[seqNb] = ZSTD_decodeSequence(&seqState, isLongOffset, ZSTD_p_prefetch); PREFETCH_L1(sequences[seqNb].match); PREFETCH_L1(sequences[seqNb].match + sequences[seqNb].matchLength - 1); /* note : it's safe to invoke PREFETCH() on any memory address, including invalid ones */ } - RETURN_ERROR_IF(seqNb<seqAdvance, corruption_detected); + RETURN_ERROR_IF(seqNb<seqAdvance, corruption_detected, ""); /* decode and decompress */ for ( ; (BIT_reloadDStream(&(seqState.DStream)) <= BIT_DStream_completed) && (seqNb<nbSeq) ; seqNb++) { - seq_t const sequence = ZSTD_decodeSequenceLong(&seqState, isLongOffset); + seq_t const sequence = ZSTD_decodeSequence(&seqState, isLongOffset, ZSTD_p_prefetch); size_t const oneSeqSize = ZSTD_execSequence(op, oend, sequences[(seqNb-ADVANCED_SEQS) & STORED_SEQS_MASK], &litPtr, litEnd, prefixStart, dictStart, dictEnd); +#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) + assert(!ZSTD_isError(oneSeqSize)); + if (frame) ZSTD_assertValidSequence(dctx, op, oend, sequences[(seqNb-ADVANCED_SEQS) & STORED_SEQS_MASK], prefixStart, dictStart); +#endif if (ZSTD_isError(oneSeqSize)) return oneSeqSize; PREFETCH_L1(sequence.match); PREFETCH_L1(sequence.match + sequence.matchLength - 1); /* note : it's safe to invoke PREFETCH() on any memory address, including invalid ones */ sequences[seqNb & STORED_SEQS_MASK] = sequence; op += oneSeqSize; } - RETURN_ERROR_IF(seqNb<nbSeq, corruption_detected); + RETURN_ERROR_IF(seqNb<nbSeq, corruption_detected, ""); /* finish queue */ seqNb -= seqAdvance; for ( ; seqNb<nbSeq ; seqNb++) { size_t const oneSeqSize = ZSTD_execSequence(op, oend, sequences[seqNb&STORED_SEQS_MASK], &litPtr, litEnd, prefixStart, dictStart, dictEnd); +#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) + assert(!ZSTD_isError(oneSeqSize)); + if (frame) ZSTD_assertValidSequence(dctx, op, oend, sequences[seqNb&STORED_SEQS_MASK], prefixStart, dictStart); +#endif if (ZSTD_isError(oneSeqSize)) return oneSeqSize; op += oneSeqSize; } @@ -1118,9 +1207,11 @@ ZSTD_decompressSequencesLong_body( /* last literal segment */ { size_t const lastLLSize = litEnd - litPtr; - RETURN_ERROR_IF(lastLLSize > (size_t)(oend-op), dstSize_tooSmall); - memcpy(op, litPtr, lastLLSize); - op += lastLLSize; + RETURN_ERROR_IF(lastLLSize > (size_t)(oend-op), dstSize_tooSmall, ""); + if (op != NULL) { + memcpy(op, litPtr, lastLLSize); + op += lastLLSize; + } } return op-ostart; @@ -1130,9 +1221,10 @@ static size_t ZSTD_decompressSequencesLong_default(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) + const ZSTD_longOffset_e isLongOffset, + const int frame) { - return ZSTD_decompressSequencesLong_body(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); + return ZSTD_decompressSequencesLong_body(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset, frame); } #endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT */ @@ -1146,9 +1238,10 @@ DONT_VECTORIZE ZSTD_decompressSequences_bmi2(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) + const ZSTD_longOffset_e isLongOffset, + const int frame) { - return ZSTD_decompressSequences_body(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); + return ZSTD_decompressSequences_body(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset, frame); } #endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG */ @@ -1157,9 +1250,10 @@ static TARGET_ATTRIBUTE("bmi2") size_t ZSTD_decompressSequencesLong_bmi2(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) + const ZSTD_longOffset_e isLongOffset, + const int frame) { - return ZSTD_decompressSequencesLong_body(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); + return ZSTD_decompressSequencesLong_body(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset, frame); } #endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT */ @@ -1169,21 +1263,23 @@ typedef size_t (*ZSTD_decompressSequences_t)( ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset); + const ZSTD_longOffset_e isLongOffset, + const int frame); #ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG static size_t ZSTD_decompressSequences(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) + const ZSTD_longOffset_e isLongOffset, + const int frame) { DEBUGLOG(5, "ZSTD_decompressSequences"); #if DYNAMIC_BMI2 if (dctx->bmi2) { - return ZSTD_decompressSequences_bmi2(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); + return ZSTD_decompressSequences_bmi2(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset, frame); } #endif - return ZSTD_decompressSequences_default(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); + return ZSTD_decompressSequences_default(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset, frame); } #endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG */ @@ -1198,15 +1294,16 @@ static size_t ZSTD_decompressSequencesLong(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) + const ZSTD_longOffset_e isLongOffset, + const int frame) { DEBUGLOG(5, "ZSTD_decompressSequencesLong"); #if DYNAMIC_BMI2 if (dctx->bmi2) { - return ZSTD_decompressSequencesLong_bmi2(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); + return ZSTD_decompressSequencesLong_bmi2(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset, frame); } #endif - return ZSTD_decompressSequencesLong_default(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); + return ZSTD_decompressSequencesLong_default(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset, frame); } #endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT */ @@ -1240,7 +1337,6 @@ ZSTD_getLongOffsetsShare(const ZSTD_seqSymbol* offTable) } #endif - size_t ZSTD_decompressBlock_internal(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, @@ -1256,7 +1352,7 @@ ZSTD_decompressBlock_internal(ZSTD_DCtx* dctx, ZSTD_longOffset_e const isLongOffset = (ZSTD_longOffset_e)(MEM_32bits() && (!frame || (dctx->fParams.windowSize > (1ULL << STREAM_ACCUMULATOR_MIN)))); DEBUGLOG(5, "ZSTD_decompressBlock_internal (size : %u)", (U32)srcSize); - RETURN_ERROR_IF(srcSize >= ZSTD_BLOCKSIZE_MAX, srcSize_wrong); + RETURN_ERROR_IF(srcSize >= ZSTD_BLOCKSIZE_MAX, srcSize_wrong, ""); /* Decode literals section */ { size_t const litCSize = ZSTD_decodeLiteralsBlock(dctx, src, srcSize); @@ -1282,6 +1378,8 @@ ZSTD_decompressBlock_internal(ZSTD_DCtx* dctx, ip += seqHSize; srcSize -= seqHSize; + RETURN_ERROR_IF(dst == NULL && nbSeq > 0, dstSize_tooSmall, "NULL not handled"); + #if !defined(ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT) && \ !defined(ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG) if ( !usePrefetchDecoder @@ -1300,17 +1398,28 @@ ZSTD_decompressBlock_internal(ZSTD_DCtx* dctx, if (usePrefetchDecoder) #endif #ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT - return ZSTD_decompressSequencesLong(dctx, dst, dstCapacity, ip, srcSize, nbSeq, isLongOffset); + return ZSTD_decompressSequencesLong(dctx, dst, dstCapacity, ip, srcSize, nbSeq, isLongOffset, frame); #endif #ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG /* else */ - return ZSTD_decompressSequences(dctx, dst, dstCapacity, ip, srcSize, nbSeq, isLongOffset); + return ZSTD_decompressSequences(dctx, dst, dstCapacity, ip, srcSize, nbSeq, isLongOffset, frame); #endif } } +void ZSTD_checkContinuity(ZSTD_DCtx* dctx, const void* dst) +{ + if (dst != dctx->previousDstEnd) { /* not contiguous */ + dctx->dictEnd = dctx->previousDstEnd; + dctx->virtualStart = (const char*)dst - ((const char*)(dctx->previousDstEnd) - (const char*)(dctx->prefixStart)); + dctx->prefixStart = dst; + dctx->previousDstEnd = dst; + } +} + + size_t ZSTD_decompressBlock(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize) diff --git a/thirdparty/zstd/decompress/zstd_decompress_block.h b/thirdparty/zstd/decompress/zstd_decompress_block.h index 7e92960410..bf39b7350c 100644 --- a/thirdparty/zstd/decompress/zstd_decompress_block.h +++ b/thirdparty/zstd/decompress/zstd_decompress_block.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -16,8 +16,8 @@ * Dependencies *********************************************************/ #include <stddef.h> /* size_t */ -#include "zstd.h" /* DCtx, and some public functions */ -#include "zstd_internal.h" /* blockProperties_t, and some public functions */ +#include "../zstd.h" /* DCtx, and some public functions */ +#include "../common/zstd_internal.h" /* blockProperties_t, and some public functions */ #include "zstd_decompress_internal.h" /* ZSTD_seqSymbol */ diff --git a/thirdparty/zstd/decompress/zstd_decompress_internal.h b/thirdparty/zstd/decompress/zstd_decompress_internal.h index ccbdfa090f..9ad96c5548 100644 --- a/thirdparty/zstd/decompress/zstd_decompress_internal.h +++ b/thirdparty/zstd/decompress/zstd_decompress_internal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -19,8 +19,8 @@ /*-******************************************************* * Dependencies *********************************************************/ -#include "mem.h" /* BYTE, U16, U32 */ -#include "zstd_internal.h" /* ZSTD_seqSymbol */ +#include "../common/mem.h" /* BYTE, U16, U32 */ +#include "../common/zstd_internal.h" /* ZSTD_seqSymbol */ @@ -95,6 +95,11 @@ typedef enum { ZSTD_use_once = 1 /* Use the dictionary once and set to ZSTD_dont_use */ } ZSTD_dictUses_e; +typedef enum { + ZSTD_obm_buffered = 0, /* Buffer the output */ + ZSTD_obm_stable = 1 /* ZSTD_outBuffer is stable */ +} ZSTD_outBufferMode_e; + struct ZSTD_DCtx_s { const ZSTD_seqSymbol* LLTptr; @@ -147,10 +152,19 @@ struct ZSTD_DCtx_s U32 legacyVersion; U32 hostageByte; int noForwardProgress; + ZSTD_outBufferMode_e outBufferMode; + ZSTD_outBuffer expectedOutBuffer; /* workspace */ BYTE litBuffer[ZSTD_BLOCKSIZE_MAX + WILDCOPY_OVERLENGTH]; BYTE headerBuffer[ZSTD_FRAMEHEADERSIZE_MAX]; + + size_t oversizedDuration; + +#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION + void const* dictContentBeginForFuzzing; + void const* dictContentEndForFuzzing; +#endif }; /* typedef'd to ZSTD_DCtx within "zstd.h" */ @@ -160,7 +174,7 @@ struct ZSTD_DCtx_s /*! ZSTD_loadDEntropy() : * dict : must point at beginning of a valid zstd dictionary. - * @return : size of entropy tables read */ + * @return : size of dictionary header (size of magic number + dict ID + entropy tables) */ size_t ZSTD_loadDEntropy(ZSTD_entropyDTables_t* entropy, const void* const dict, size_t const dictSize); diff --git a/thirdparty/zstd/zstd.h b/thirdparty/zstd/zstd.h index 72080ea87e..8c6fc6ae90 100644 --- a/thirdparty/zstd/zstd.h +++ b/thirdparty/zstd/zstd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the @@ -72,7 +72,7 @@ extern "C" { /*------ Version ------*/ #define ZSTD_VERSION_MAJOR 1 #define ZSTD_VERSION_MINOR 4 -#define ZSTD_VERSION_RELEASE 4 +#define ZSTD_VERSION_RELEASE 5 #define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE) ZSTDLIB_API unsigned ZSTD_versionNumber(void); /**< to check runtime library version */ @@ -274,7 +274,10 @@ typedef enum { * Default level is ZSTD_CLEVEL_DEFAULT==3. * Special: value 0 means default, which is controlled by ZSTD_CLEVEL_DEFAULT. * Note 1 : it's possible to pass a negative compression level. - * Note 2 : setting a level resets all other compression parameters to default */ + * Note 2 : setting a level does not automatically set all other compression parameters + * to default. Setting this will however eventually dynamically impact the compression + * parameters which have not been manually set. The manually set + * ones will 'stick'. */ /* Advanced compression parameters : * It's possible to pin down compression parameters to some specific values. * In which case, these values are no longer dynamically selected by the compressor */ @@ -519,11 +522,13 @@ typedef enum { /* note : additional experimental parameters are also available * within the experimental section of the API. * At the time of this writing, they include : - * ZSTD_c_format + * ZSTD_d_format + * ZSTD_d_stableOutBuffer * Because they are not stable, it's necessary to define ZSTD_STATIC_LINKING_ONLY to access them. * note : never ever use experimentalParam? names directly */ - ZSTD_d_experimentalParam1=1000 + ZSTD_d_experimentalParam1=1000, + ZSTD_d_experimentalParam2=1001 } ZSTD_dParameter; @@ -763,7 +768,7 @@ ZSTDLIB_API size_t ZSTD_freeDStream(ZSTD_DStream* zds); /* This function is redundant with the advanced API and equivalent to: * - * ZSTD_DCtx_reset(zds); + * ZSTD_DCtx_reset(zds, ZSTD_reset_session_only); * ZSTD_DCtx_refDDict(zds, NULL); */ ZSTDLIB_API size_t ZSTD_initDStream(ZSTD_DStream* zds); @@ -1263,23 +1268,28 @@ ZSTDLIB_API size_t ZSTD_getSequences(ZSTD_CCtx* zc, ZSTD_Sequence* outSeqs, ***************************************/ /*! ZSTD_estimate*() : - * These functions make it possible to estimate memory usage of a future - * {D,C}Ctx, before its creation. + * These functions make it possible to estimate memory usage + * of a future {D,C}Ctx, before its creation. + * + * ZSTD_estimateCCtxSize() will provide a memory budget large enough + * for any compression level up to selected one. + * Note : Unlike ZSTD_estimateCStreamSize*(), this estimate + * does not include space for a window buffer. + * Therefore, the estimation is only guaranteed for single-shot compressions, not streaming. + * The estimate will assume the input may be arbitrarily large, + * which is the worst case. * - * ZSTD_estimateCCtxSize() will provide a budget large enough for any - * compression level up to selected one. Unlike ZSTD_estimateCStreamSize*(), - * this estimate does not include space for a window buffer, so this estimate - * is guaranteed to be enough for single-shot compressions, but not streaming - * compressions. It will however assume the input may be arbitrarily large, - * which is the worst case. If srcSize is known to always be small, - * ZSTD_estimateCCtxSize_usingCParams() can provide a tighter estimation. - * ZSTD_estimateCCtxSize_usingCParams() can be used in tandem with - * ZSTD_getCParams() to create cParams from compressionLevel. - * ZSTD_estimateCCtxSize_usingCCtxParams() can be used in tandem with - * ZSTD_CCtxParams_setParameter(). + * When srcSize can be bound by a known and rather "small" value, + * this fact can be used to provide a tighter estimation + * because the CCtx compression context will need less memory. + * This tighter estimation can be provided by more advanced functions + * ZSTD_estimateCCtxSize_usingCParams(), which can be used in tandem with ZSTD_getCParams(), + * and ZSTD_estimateCCtxSize_usingCCtxParams(), which can be used in tandem with ZSTD_CCtxParams_setParameter(). + * Both can be used to estimate memory using custom compression parameters and arbitrary srcSize limits. * - * Note: only single-threaded compression is supported. This function will - * return an error code if ZSTD_c_nbWorkers is >= 1. */ + * Note 2 : only single-threaded compression is supported. + * ZSTD_estimateCCtxSize_usingCCtxParams() will return an error code if ZSTD_c_nbWorkers is >= 1. + */ ZSTDLIB_API size_t ZSTD_estimateCCtxSize(int compressionLevel); ZSTDLIB_API size_t ZSTD_estimateCCtxSize_usingCParams(ZSTD_compressionParameters cParams); ZSTDLIB_API size_t ZSTD_estimateCCtxSize_usingCCtxParams(const ZSTD_CCtx_params* params); @@ -1642,6 +1652,37 @@ ZSTDLIB_API size_t ZSTD_DCtx_setMaxWindowSize(ZSTD_DCtx* dctx, size_t maxWindowS * allowing selection between ZSTD_format_e input compression formats */ #define ZSTD_d_format ZSTD_d_experimentalParam1 +/* ZSTD_d_stableOutBuffer + * Experimental parameter. + * Default is 0 == disabled. Set to 1 to enable. + * + * Tells the decompressor that the ZSTD_outBuffer will ALWAYS be the same + * between calls, except for the modifications that zstd makes to pos (the + * caller must not modify pos). This is checked by the decompressor, and + * decompression will fail if it ever changes. Therefore the ZSTD_outBuffer + * MUST be large enough to fit the entire decompressed frame. This will be + * checked when the frame content size is known. The data in the ZSTD_outBuffer + * in the range [dst, dst + pos) MUST not be modified during decompression + * or you will get data corruption. + * + * When this flags is enabled zstd won't allocate an output buffer, because + * it can write directly to the ZSTD_outBuffer, but it will still allocate + * an input buffer large enough to fit any compressed block. This will also + * avoid the memcpy() from the internal output buffer to the ZSTD_outBuffer. + * If you need to avoid the input buffer allocation use the buffer-less + * streaming API. + * + * NOTE: So long as the ZSTD_outBuffer always points to valid memory, using + * this flag is ALWAYS memory safe, and will never access out-of-bounds + * memory. However, decompression WILL fail if you violate the preconditions. + * + * WARNING: The data in the ZSTD_outBuffer in the range [dst, dst + pos) MUST + * not be modified during decompression or you will get data corruption. This + * is because zstd needs to reference data in the ZSTD_outBuffer to regenerate + * matches. Normally zstd maintains its own buffer for this purpose, but passing + * this flag tells zstd to use the user provided buffer. + */ +#define ZSTD_d_stableOutBuffer ZSTD_d_experimentalParam2 /*! ZSTD_DCtx_setFormat() : * Instruct the decoder context about what kind of data to decode next. |